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

[Bug] Depercated warning regarding __self__ in defaults list #2953

Open
francois-rozet opened this issue Sep 13, 2024 · 0 comments
Open

[Bug] Depercated warning regarding __self__ in defaults list #2953

francois-rozet opened this issue Sep 13, 2024 · 0 comments

Comments

@francois-rozet
Copy link

The following code should be removed.

if not has_self and has_non_override or len(defaults) == 0:
# This check is here to make the migration from Hydra 1.0 to Hydra 1.1 smoother and should be removed in 1.2
# The warning should be removed in 1.2
if containing_node.primary and has_config_content and has_non_override:
msg = (
f"In '{containing_node.get_config_path()}': Defaults list is missing `_self_`. "
f"See https://hydra.cc/docs/1.2/upgrades/1.0_to_1.1/default_composition_order for more information"
)
if os.environ.get("SELF_WARNING_AS_ERROR") == "1":
raise ConfigCompositionException(msg)
warnings.warn(msg, UserWarning)
defaults.append(ConfigDefault(path="_self_"))

@francois-rozet francois-rozet changed the title Depercated warning regarding __self__ in defaults list [Bug] Depercated warning regarding __self__ in defaults list Sep 13, 2024
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