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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite subconfig arguments #418

Open
rusmux opened this issue Nov 8, 2023 · 2 comments
Open

Overwrite subconfig arguments #418

rusmux opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@rusmux
Copy link

rusmux commented Nov 8, 2023

馃殌 Feature request

Allow to overwrite subconfig arguments. For example:

evaluate.yaml:

model: model.yaml
data: path/to/data

model.yaml:

class_path: path.to.Model
init_args:
  a: 1
  b: 2
  c: 3
  d: 4
  e: 5

I want to create evaluate_2.yaml with e argument of the model equal to something else. It would be nice to do this like this:

model: model.yaml
  init_args:
    e: 6

I can do this from the CLI by passing an argument, but I would also like to do it using config.

Probably something similar has already been suggested, but I got lost in numerous problems here and in Lightning, so I would appreciate it if you could help me. Thanks!

Motivation

To avoid duplicating configs.

@rusmux rusmux added the enhancement New feature or request label Nov 8, 2023
@function2-llx
Copy link

Seemingly related to #221.

@rusmux
Copy link
Author

rusmux commented Nov 10, 2023

Yes, thank you! As indicated there, this can be done from the CLI, but there are cases when it is inconvenient to specify arguments from the CLI, for example, if it is a list of some strings. I can create a separate file in which I would override this argument, but now instead of 1 file (evaluation_2.yaml) I get 2 files (evaluation_2.yaml and model_2.yaml). I think it's more convenient to put this argument directly in evaluation_2.yaml.

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

No branches or pull requests

2 participants