SimpleParsing
SimpleParsing copied to clipboard
Setting the attributes of a default config in subgroups
Describe the bug Not sure whether it's a bug, or it's expected:
After specifying the default config in a subgroups
, changing the inner attributes of the default configuration requires prior specification within the subgroups
.
To Reproduce The same code in the example provided in subgroups.
$ python issue.py --model model_a --model.lr 1e-2
Config(model=ModelAConfig(lr=0.01, optimizer='Adam', betas=(0.9, 0.999)), dataset=Dataset2Config(data_dir='data/bar', bar=1.2))
$ python issue.py --model.lr 1e-2. % I was expecting this to work given that both model configs have `lr` attribute
Config(model=ModelAConfig(lr=0.0003, optimizer='Adam', betas=(0.9, 0.999)), dataset=Dataset2Config(data_dir='data/bar', bar=1.2))
$ python issue.py --model model_a --model.betas 0. 1.
Config(model=ModelAConfig(lr=0.0003, optimizer='Adam', betas=(0.0, 1.0)), dataset=Dataset2Config(data_dir='data/bar', bar=1.2))
$ python issue.py --model.betas 0. 1. % ModelA being the default, I was expecting this two work
Config(model=ModelAConfig(lr=0.0003, optimizer='Adam', betas=(0.9, 0.999)), dataset=Dataset2Config(data_dir='data/bar', bar=1.2))
Desktop (please complete the following information):
- Version 0.0.20
- Python version: 3.10
Nice catch! This new subgroups feature needs a bit more testing. Thanks for pointing this out!