dir interpolation from hydra into job config is not working
See original GitHub issueI can set the second_dir
from base_dir
, but output_subdir
can not in this case.
experiment:
base_dir: ???
second_dir: ${experiment.base_dir}
hydra:
output_subdir: ${experiment.base_dir}/.hydra
KeyError: "str interpolation key 'experiment.base_dir' not found"
Is there any way I can change the hydra config based on current .yaml or some alternately way?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Interpolation in Hydra's defaults list cause and error
1 Answer 1 ... It is not possible to reference a key in the main config using interpolation from the defaults list. From...
Read more >Job Configuration - Hydra
The job configuration resides in hydra.job. ... Decides whether Hydra changes the current working directory to the output directory for each job.
Read more >Hydra for tracking machine learning experiments
Variable interpolation is supported but a little bit weird because it supports both internal variables (which we just saw) and system ...
Read more >Installation — OmegaConf 2.0.6 documentation - Read the Docs
OmegaConf support variable interpolation, Interpolations are evaluated lazily on access. Config node interpolation¶. The interpolated variable can be the dot- ...
Read more >Complete tutorial on how to use Hydra in Machine Learning ...
We can check the directory structure again, after running python main.py . src ├── config │ └── config.yaml ├── main.py ├── outputs
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For posterity: I needed
${hydra:runtime.cwd}
rather than${hydra.runtime.cwd}
in order to get interpolation to work.By the way, the next version of Hydra will also have a variable:
hydra.runtime.cwd
which will hold the current working directory you launched your app from, so you will presumable be able to do something crazy like:hydra.run.dir: ${hydra:runtime.cwd}
Although I did not test it. If you want to try install Hydra from master.