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

[Feature Request] Looking for overriding the group parameter in config #2956

Open
foreverYoungGitHub opened this issue Sep 17, 2024 · 0 comments
Labels
enhancement Enhanvement request

Comments

@foreverYoungGitHub
Copy link

🚀 Feature Request

Looking for overriding the group parameter in config.

Motivation

Is your feature request related to a problem? Please describe.

Yes, this feature request is related to a problem I am encountering with configuration management. When I have a main config file and an experiment config file, I want to override the group parameter defined in the main file. For example:

In the main file:

model:
  loss:
    _target_: a
    param_1: 0

In the experiment file:

model:
  loss:
    _target_: b
    param_2: 0

Currently, it seems that the parameters from the main file are not fully overridden by the experiment file, resulting in a merged configuration that includes both param_1 and param_2. This is problematic because param_1 is not supported by _target_: b.

Pitch

Describe the solution you'd like

I would like a feature that allows the full override of a group parameter in the configuration. Specifically, when running with the experiment config file, the loss parameter should only contain param_2 and not param_1, as param_1 is not supported by _target_: b.

Describe alternatives you've considered

An alternative solution could be to add a special parameter like _override_ that explicitly indicates that the group parameter should be fully overridden. For example:

model:
  loss:
    _override_: true
    _target_: b
    param_2: 0

Are you willing to open a pull request? (See CONTRIBUTING)
Yes, I am willing to open a pull request to implement this feature.

Additional context

Add any other context or screenshots about the feature request here.

This feature would greatly simplify configuration management in scenarios where different experiment configurations need to fully override parameters defined in a main config file. It would help avoid conflicts and ensure that only the relevant parameters for the specified target are included.

Thank you for considering this feature request!

@foreverYoungGitHub foreverYoungGitHub added the enhancement Enhanvement request label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhanvement request
Projects
None yet
Development

No branches or pull requests

1 participant