SimpleParsing icon indicating copy to clipboard operation
SimpleParsing copied to clipboard

Support FLAT mode in config file

Open RmZeta2718 opened this issue 5 months ago • 1 comments

Is your feature request related to a problem? Please describe. As far as I know, when using composition dataclasses, I can only specify the full destination structure in the config file. Flat arguments are only available in the command line.

Describe the solution you'd like

It would be great if config file supports flat arguments for composition dataclasses:

So the example (examples/config_files/composition_defaults.yaml) can be modified to:

a: "default value for `a` from the Parser's `config_path` (composition_defaults.yaml)"
b: "default value for `b` from the Parser's `config_path` (composition_defaults.yaml)"
c: "default value for `c` from the Parser's `config_path` (composition_defaults.yaml)"

Additional context env:

  • python 3.11
  • simple-parsing 0.1.6

RmZeta2718 avatar Sep 18 '24 08:09 RmZeta2718