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
Merging nested readonly structured configs doesn't work. #1102
Comments
Thanks for the report, @amatsukawa. For now, you can work around this issue using the from omegaconf import read_write
...
with read_write(b.a):
print(OmegaConf.merge(b, {"a": {"x": 3}})) |
Thanks for the response @Jasha10. For those who come later: indeed that was the workaround I had come to, but to use merge with (1) an arbitrarily nested structured template config and (2) unknown (ahead of time) updates in the second argument of the merge, I had settled on recursively setting the readonly flag to false on every |
Describe the bug
Merging nested readonly structured configs doesn't work.
There seems to be code to temporarily unset the read-only property of the outer-most container prior to merge to make this work in
OmegaConf.merge
. I believe the issue is that this logic needs to be recursive.To Reproduce
Expected behavior
Merging nested structured readonly configs should work.
The text was updated successfully, but these errors were encountered: