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

Unable to pickle typing.Dict[kt, vt] and List[vt] on python 3.6 #407

Closed
4 tasks done
pereman2 opened this issue Oct 16, 2020 · 1 comment · Fixed by #408
Closed
4 tasks done

Unable to pickle typing.Dict[kt, vt] and List[vt] on python 3.6 #407

pereman2 opened this issue Oct 16, 2020 · 1 comment · Fixed by #408
Labels
bug Something isn't working
Milestone

Comments

@pereman2
Copy link
Contributor

pereman2 commented Oct 16, 2020

Describe the bug
Pickling generic types Dict[kt, vt] and List[vt]on python 3.6 produces an error.

To Reproduce

@dataclass
class Pick:
    union: Dict[str, int] = field(default_factory=lambda: {})

with tempfile.TemporaryFile() as fp:
    c = OmegaConf.structured(Pick)
    pickle.dump(c, fp)
    fp.flush()
    fp.seek(0)
    c1 = pickle.load(fp)

Expected behavior
It should be able to pickle.

Additional context

  • OmegaConf version: 2.1.0
  • Python version: 3.6
  • Operating system : macOS
  • Please provide a minimal repro
@omry
Copy link
Owner

omry commented Oct 17, 2020

@JieruHu, this could be related to the issue you are seeing in the Ray Launcher on 3.6.

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.

2 participants