Say I have a directory utility_configs
that has a bunch of different configurations for different things that are useful in different situations. And then I want to be able to use these different configs in different places. For instance, maybe my model has many different places where I need something that is an "encoder" (really just a bit of network that maps an input to an output). I might have vary different encoders in my utility_configs
directory, and I would like to be able to specify any of them anyplace I need an encoder (possibly then adjusting the number of input and output channels or other parameters). I am not seeing how to do this straightforwardly since it seems like the only way you can get data from a different file is using the defaults list. But that's not really a good fit here since I might need multiple different things from utility_configs
and in multiple different places (including subconfigs)
You cannot interpolate into a file. Interpolation works on the current config object. Hydra can compose the config for you, after which you can use interpolation.
You have multiple options:
--config-name|-cn
).+GROUP=OPTION
notation (see this).About using a config in different places, take a look at config packages - which allows you to relocate the content of a config in the composed config object.
I recommend going with 1.