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

Failure to initialize a config with a nested structured config typed as Any. #260

Closed
omry opened this issue May 30, 2020 · 0 comments · Fixed by #261
Closed

Failure to initialize a config with a nested structured config typed as Any. #260

omry opened this issue May 30, 2020 · 0 comments · Fixed by #261
Labels
bug Something isn't working

Comments

@omry
Copy link
Owner

omry commented May 30, 2020

This fails

from omegaconf import OmegaConf
from typing import Any
from dataclasses import dataclass

@dataclass
class Nested:
  ...

@dataclass
class NestedWithAny:
    var: Any = Nested()

cfg = OmegaConf.structured(NestedWithAny)

Result:

omegaconf.errors.UnsupportedValueType: Value 'Nested' is not a supported primitive type
        full_key: 
        reference_type=None
        object_type=None
@omry omry added this to the OmegaConf 2.0 milestone May 30, 2020
omry added a commit that referenced this issue May 30, 2020
@omry omry closed this as completed in #261 May 30, 2020
omry added a commit that referenced this issue May 30, 2020
omry added a commit that referenced this issue May 30, 2020
@omry omry modified the milestones: OmegaConf 2.0, 2.0.1 Jun 28, 2020
@omry omry added the bug Something isn't working label Jul 12, 2020
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.

1 participant