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

Issue a warning if primary config is missing _self_ and is overriding config values #1755

Closed
omry opened this issue Aug 4, 2021 · 2 comments · Fixed by #1756
Closed

Issue a warning if primary config is missing _self_ and is overriding config values #1755

omry opened this issue Aug 4, 2021 · 2 comments · Fixed by #1756
Milestone

Comments

@omry
Copy link
Collaborator

omry commented Aug 4, 2021

Hydra 1.1 changed the default composition order and it turned out more disruptive than initially expected.
To help people migrating be aware of the change, we will issue a warning if the primary config is specifying both a Defaults List and config values and the Defaults List is not specifying `self.

This warning may be removed in Hydra 1.2.

@postrational
Copy link

postrational commented Mar 7, 2022

Is it possible to supress this warning in the meanwhile before 1.2 comes out(assuming new app, no hydra 1.0 compatibility needed)?

@Jasha10
Copy link
Collaborator

Jasha10 commented Mar 7, 2022

The warning is raised as a UserWarning using python's warnings.warn stdlib function. Here is the relevant code in Hydra. You should be able to suppress this by configuring the warnings filter.

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

Successfully merging a pull request may close this issue.

3 participants