How to override variables in subdirectory from another subdirectory in the same level? #2722
Replies: 1 comment 1 reply
-
Generally speaking, you could use What makes things tricky in your use case is that you want to set a value that depends on the value you are overriding. Here's a potential way to achieve this (but yeah, it's not super clean):
defaults:
- paths@_orig_paths: ${paths} # backup value that we may override
- paths: config
- _self_ And then #@package _global_
experiment:
experiment_name: experiment_A
paths:
dbg_paths: ${_orig_paths.dbg_paths}/${experiment.experiment_name} Depending on the exact constraints on which configs you can change, you may be able to make this cleaner. One annoying thing is that you can't access |
Beta Was this translation helpful? Give feedback.
-
I have the following hydra setup:
config.yaml
:paths.config.yaml
:Given that I run my script with:
python main.py +experiments=results
, how do I overridepaths.debug_path
in the experiments.config.yaml?Something like?:
experiments.config.yaml
:In my code I'm trying to only refer to
config.paths.dbg_path
and I'd like it to adapt to the experiment name.Thanks,
Nick
Beta Was this translation helpful? Give feedback.
All reactions