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

Allow OmegaConf.update to ignore struct flag and structured configs and add anyway #664

Closed
omry opened this issue Apr 7, 2021 · 0 comments · Fixed by #665
Closed

Allow OmegaConf.update to ignore struct flag and structured configs and add anyway #664

omry opened this issue Apr 7, 2021 · 0 comments · Fixed by #665
Milestone

Comments

@omry
Copy link
Owner

omry commented Apr 7, 2021

Motivation:
In facebookresearch/hydra#1515, an attempt to use +foo.bar=10 (+ indicates forced addition in Hydra) is failing if foo is Structured Config.

The current implementation in Hydra is using open_dict on the config root, but Structured Configs are considered closed by default which means the flag override is not effective.
To address this, I will add a force_add flag to OmegaConf.update(), that will override the struct node directly on the manipulated node as it traverses the provided path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant