Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support FLAT mode in config file #329

Open
RmZeta2718 opened this issue Sep 18, 2024 · 1 comment
Open

Support FLAT mode in config file #329

RmZeta2718 opened this issue Sep 18, 2024 · 1 comment

Comments

@RmZeta2718
Copy link

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
@lebrice
Copy link
Owner

lebrice commented Oct 18, 2024

Hey @RmZeta2718 , thanks for posting, sorry for the late reply.

This is interesting, but sounds a bit too specific to config files and serialization. I don't see a way to realistically add this at the moment. Feel free to give this a shot though if you're up for it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants