Skip to content

Support FLAT mode in config file #329

@RmZeta2718

Description

@RmZeta2718

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions