Open AlejandroBaron opened 2 months ago
This is not a bug. Not everything can be parsed as a subconfig. A relative path to a subconfig inside another config only works if the parser has an action that would load it. Subconfigs are only available for top-level classes in a typehint, not nested like in a dict. Generally you can see which subconfigs can be loaded by printing the --help
.
If not a bug, could this be added as a new feature? Might be, though most likely it would be technically quite complex and be low priority.
This is not a bug. Not everything can be parsed as a subconfig. A relative path to a subconfig inside another config only works if the parser has an action that would load it. Subconfigs are only available for top-level classes in a typehint, not nested like in a dict. Generally you can see which subconfigs can be loaded by printing the
--help
.If not a bug, could this be added as a new feature? Might be, though most likely it would be technically quite complex and be low priority.
Yeah I assumed that it was not a bug but just not supported right now. Is there a way/plan to use resolvers like omegaconf does for this kind of situation?
Using relative config files in dicts doesn't work. It might be that I'm not using the correct syntax tho
To reproduce
3 files in the same directory
1)
cli.py
(If you use a
List
instead ofDict
ford
param, same error happens)2)
main.yaml
3)
my_obj.yaml
Command:
python cli.py --config main.yaml
. RaisesAs I said it might not be a bug. I'm using python 3.8, but in the project that triggered this error I'm using python 3.9.