Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hydra ListConfig objects are not dynamically interploated. #611

Open
RafayAK opened this issue Oct 14, 2023 · 1 comment · May be fixed by #612
Open

Hydra ListConfig objects are not dynamically interploated. #611

RafayAK opened this issue Oct 14, 2023 · 1 comment · May be fixed by #612

Comments

@RafayAK
Copy link

RafayAK commented Oct 14, 2023

Hi, there is a small bug/oversight when using Hydra's dynamically interploated configurations. This issue is particularly in regards to the tags list in the experiment.yaml, for example.

tags:
  - "mnist"
  - "simple_dense_net"
  - ${task_name}  # should be dynamically interpolated
  - batch_size_${data.batch_size} # should also be dynamically interpolated

seed: 12345

trainer:
  min_epochs: 10
  max_epochs: 10
  gradient_clip_val: 0.5

...
...

logger:
  wandb:
    tags: ${tags}
    group: "mnist"
  aim:
    experiment: "mnist"

The tags list gets correctly resolved when Wandb configs are resolved but the tags them selves are not dynamically resolved when the config tree is printed:

CONFIG
├── data
│   └── _target_: src.data.mnist_datamodule.MNISTDataModule 
|           ....                                                                                                                                       
│                                                                                                                                                                                                  
├── model
│   └── _target_: src.models.mnist_module.MNISTLitModule                                                                                                                                           
│       ...                                                                                                                                                                                                                                                                                                                                                  
│                                                                                                                                                                                                  
├── callbacks
│   └── ...                                                                                                                        
│                                                                                                                                                                                                  
├── logger
│   └── wandb:                                                                                                                                                                                     
│         tags:                                                                                                                                                                                    
│         - mnist                                                                                                                                                                                  
│         - simple_dense_net                                                                                                                                                                       
│         - train   # RESOLVED                                                                                                                                                                               
│         - batch_size_64     # RESOLVED                                                                                                                                                                    
│         group: mnist                                                                                                                                                                             
│       aim:                                                                                                                                                                                       
│         experiment: mnist                                                                                                                                                                        
│                                                                                                                                                                                                  
...
...                                                                                                                                                 
├── task_name
│   └── train                                                                                                                                                                                      
├── tags
│   └── ['mnist', 'simple_dense_net', '${task_name}', 'batch_size_${data.batch_size}']   # UNRESOLVED
@RafayAK RafayAK linked a pull request Oct 14, 2023 that will close this issue
5 tasks
@RafayAK
Copy link
Author

RafayAK commented Oct 14, 2023

@ashleve I've added a small PR against this issue, you may review and merge at your discretion.

Thanks a lot for this Project 🥂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant