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

Dynamic schema with many different defaults #1023

Closed
EricMichaelSmith opened this issue Sep 29, 2020 · 1 comment
Closed

Dynamic schema with many different defaults #1023

EricMichaelSmith opened this issue Sep 29, 2020 · 1 comment
Labels
enhancement Enhanvement request

Comments

@EricMichaelSmith
Copy link

🚀 Feature Request

The docs here detail defining a dynamic schema in which different config files can be chosen; it'd also be nice to have the ability to set the defaults list based on which schema we're choosing. For instance, in the example in the docs, MySQLConfig and PostGreSQLConfig would each have their own defaults.

Motivation

I have two config files representing different schema, and two sets of defaults, one for each of those schema. I'd like to be able to specify which set of defaults and which config file to use on the command line, ideally with one single command-line flag.

Pitch

Describe the solution you'd like
Perhaps an easy way to set defaults per schema? For instance, this could be a new argument in the signature of ConfigStore.store()

Describe alternatives you've considered
Honestly, I'll probably fall back to just having two different run scripts for now, each one tied to each of my config files and sets of defaults. I'd like to scale this up eventually to many config files and many sets of defaults, and I'll have to reassess then whether there is a better structure that I can use for this.

@EricMichaelSmith EricMichaelSmith added the enhancement Enhanvement request label Sep 29, 2020
@omry
Copy link
Collaborator

omry commented Sep 29, 2020

Hi @EricMichaelSmith, thanks for the feature request.
I believe this is a duplicate of #171, which is planned for Hydra 1.1.

One temporary solution is to override the config-name from the command line and point it to a config file with a different defaults list.

@omry omry closed this as completed Sep 29, 2020
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

2 participants