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

BC breaking when for "allow_objects=True" flag #939

Closed
xvjiarui opened this issue May 23, 2022 · 3 comments · Fixed by #944
Closed

BC breaking when for "allow_objects=True" flag #939

xvjiarui opened this issue May 23, 2022 · 3 comments · Fixed by #944
Labels
bug Something isn't working

Comments

@xvjiarui
Copy link

Describe the bug
In 2.2.1 version, "allow_objects=True" flag for DictConfg behavior changed.

To Reproduce

from omegaconf import OmegaConf, DictConfig
from collections import namedtuple
Shape=namedtuple("Shape", field_names=["channels", "height", "width"])
a = Shape(10, 2, 3)
cfg = DictConfig(dict(shape=a), flags={"allow_objects": True})

In 2.1.1:
cfg is {'shape': Shape(channels=10, height=2, width=3)}.

In 2.2.1:
cfg is [10, 2, 3].

@xvjiarui xvjiarui added the bug Something isn't working label May 23, 2022
@Jasha10 Jasha10 added this to the OmegaConf 2.2.2 milestone May 23, 2022
@Jasha10
Copy link
Collaborator

Jasha10 commented May 23, 2022

Thanks for the bug report, @xvjiarui.

@xvjiarui
Copy link
Author

Thank you! @Jasha10

@pixelb
Copy link
Collaborator

pixelb commented May 23, 2022

git bisect identifies commit 4b19378 as the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants