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

How to override the default model in main.yaml in code when testing different models #2938

Open
ETTAN93 opened this issue Aug 20, 2024 · 0 comments

Comments

@ETTAN93
Copy link

ETTAN93 commented Aug 20, 2024

This is the current file structure that I have where the root config level has a main.yaml file and a models folder that consists of the different model definitions.
image
image

In my main.yaml file, I defined the default model as LGBM:
image
image

Hence, when I run config.models, I get
image

Let's say for example now I want to switch to testing a naive_seasonal model instead where it is defined as:
image

How do I do that with hydra in code? I know that I can override parameters in the main.yaml file, for example config.data.start_date = '2017-01-01' and that would override the original value. How do I do the same with the model so that it points to the right hyperparameters? I tried config.model_type = 'naive_s' but that only changes the model type and not the model hyperparameters.

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

1 participant