Closed carmocca closed 5 months ago
Given that
class Thing:
def __init__(self, foo=1, bar=2):
print(locals())
from jsonargparse import CLI
CLI(Thing)
foo: 123
bar: 321
python repro.py --config repro.yaml --foo 9
Works as expected, I would expect these two approaches to produce the same result
Thank you for reporting! This is fixed with #471.
🐛 Bug report
To reproduce
repro.py
:repro.yaml
:python repro.py --config repro.yaml --thing.foo 9
Expected behavior
The above prints
but I expected
Context
A more real world example is that you have a
trainer_config.yaml
and you want to only modify the--train.max_epochs
value without having everything else fall back to dataclass defaultsEnvironment
Version 4.275