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]Config aliases #2032

Open
jbaczek opened this issue Feb 16, 2022 · 2 comments
Open

[Feature Request]Config aliases #2032

jbaczek opened this issue Feb 16, 2022 · 2 comments
Labels
enhancement Enhanvement request

Comments

@jbaczek
Copy link
Contributor

jbaczek commented Feb 16, 2022

🚀 Feature Request

It would be nice to have shortcut (alias) fields in a top level config that are not reflected in the final config.
Related issue: #2022

Motivation

As described in the related issue I want my configs to have shortcuts for deeply nested config fields. I want these 2 calls to be equivalent:

python hydra_app.py trainer.config.batch_size=32 trainer/criterion=L1
python hydra_app.py batch_size=32 criterion=L1

Pitch

I'd like new top level config key word to be introduced, that would allow me to define such mappings.

defaults:
    - trainer: trainer_a

aliases:
    - batch_size: trainer.config.batch_size
    - criterion: trainer/criterion

All the solutions I've checked, either left duplicated fields in the final config, failed to synchronize these field or required adding additional python code to be called after constructing the config. Full description of the efforts is here: #2022

@tesfaldet
Copy link

This would be very nice

@HydrogenSulfate
Copy link

🚀 Feature Request

It would be nice to have shortcut (alias) fields in a top level config that are not reflected in the final config. Related issue: #2022

Motivation

As described in the related issue I want my configs to have shortcuts for deeply nested config fields. I want these 2 calls to be equivalent:

python hydra_app.py trainer.config.batch_size=32 trainer/criterion=L1
python hydra_app.py batch_size=32 criterion=L1

Pitch

I'd like new top level config key word to be introduced, that would allow me to define such mappings.

defaults:
    - trainer: trainer_a

aliases:
    - batch_size: trainer.config.batch_size
    - criterion: trainer/criterion

All the solutions I've checked, either left duplicated fields in the final config, failed to synchronize these field or required adding additional python code to be called after constructing the config. Full description of the efforts is here: #2022

Same here and solution you given in Pitch chapter is nice and that's what I want, hope it will be implemented soon.

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

3 participants