Skip to content

Commit

Permalink
Extract configuration of img/clin attrs to use in its own config group
Browse files Browse the repository at this point in the history
This also allows us to further simplify the Hydra dirname scheme
  • Loading branch information
nathanpainchaud committed Nov 1, 2023
1 parent 501c61e commit 67e7096
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 3 deletions.
6 changes: 3 additions & 3 deletions didactic/config/experiment/cardinal/multimodal-xformer.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# @package _global_

defaults:
- /task/data: all
- /task/img_tokenizer/model: null
- /task/model/encoder: ???
- /task/model/contrastive_head: mlp
Expand Down Expand Up @@ -101,8 +102,6 @@ n_img_attrs: ${op.mul:${builtin.len:${task.views}},${builtin.len:${task.img_attr
task:
_target_: didactic.tasks.cardiac_multimodal_representation.CardiacMultimodalRepresentationTask
embed_dim: 8
clinical_attrs: ${list.remove:${data.process_patient_kwargs.clinical_attributes},${excluded_clinical_attrs}}
img_attrs: ${data.process_patient_kwargs.image_attributes}
views: ${data.patients_kwargs.views}
latent_token: True
sequential_pooling: False
Expand All @@ -122,7 +121,7 @@ callbacks:
_target_: pytorch_lightning.callbacks.LearningRateFinder


experiment_dirname: img_tokenizer=${hydra:runtime.choices.task/img_tokenizer/model}/n_clinical_attrs=${n_clinical_attrs},n_img_attrs=${n_img_attrs}/contrastive=${oc.select:task.contrastive_loss_weight,0}
experiment_dirname: data=${hydra:runtime.choices.task/data}/contrastive=${oc.select:task.contrastive_loss_weight,0}/time_series_tokenizer=${hydra:runtime.choices.task/img_tokenizer/model}
hydra:
job:
config:
Expand All @@ -146,6 +145,7 @@ hydra:

- data
- excluded_clinical_attrs
- task/data
- task.clinical_attrs
- task.img_attrs
- task.predict_losses
Expand Down
5 changes: 5 additions & 0 deletions didactic/config/task/data/all-clinical.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @package _global_

task:
clinical_attrs: ${list.remove:${data.process_patient_kwargs.clinical_attributes},${excluded_clinical_attrs}}
img_attrs: []
5 changes: 5 additions & 0 deletions didactic/config/task/data/all.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @package _global_

task:
clinical_attrs: ${list.remove:${data.process_patient_kwargs.clinical_attributes},${excluded_clinical_attrs}}
img_attrs: ${data.process_patient_kwargs.image_attributes}
18 changes: 18 additions & 0 deletions didactic/config/task/data/top-13+img.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# @package _global_

task:
clinical_attrs:
- sbp_tte
- pp_tte
- age
- diastolic_dysfunction_param_sum
- pw_d
- lvm_ind
- e_e_prime_ratio
- gfr
- lateral_e_prime
- septal_e_prime
- a_velocity
- ddd
- la_volume
img_attrs: ${data.process_patient_kwargs.image_attributes}
18 changes: 18 additions & 0 deletions didactic/config/task/data/top-13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# @package _global_

task:
clinical_attrs:
- sbp_tte
- pp_tte
- age
- diastolic_dysfunction_param_sum
- pw_d
- lvm_ind
- e_e_prime_ratio
- gfr
- lateral_e_prime
- septal_e_prime
- a_velocity
- ddd
- la_volume
img_attrs: []

0 comments on commit 67e7096

Please sign in to comment.