Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Relax OmegaConf.save() to accept Any #287

Closed
omry opened this issue Jul 10, 2020 · 2 comments · Fixed by #307
Closed

Relax OmegaConf.save() to accept Any #287

omry opened this issue Jul 10, 2020 · 2 comments · Fixed by #307
Labels
bug Something isn't working easy

Comments

@omry
Copy link
Owner

omry commented Jul 10, 2020

It should happily accept either a real OmegaConf object or a structured config (something annotated as dataclass).
there should be a runtime check to make sure input is valid.

@omry omry added this to the OmegaConf 2.0.1 milestone Jul 10, 2020
@omry omry added bug Something isn't working easy labels Jul 11, 2020
@pereman2
Copy link
Contributor

Should it also accept attr classes ?

@omry
Copy link
Owner Author

omry commented Jul 16, 2020

Any covers both dataclasses and attrclasses.

I don't think there is anything (pun!) better to do. if you can find a way to accept dataclasses (and attr classes) without using Any let me know.

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

Successfully merging a pull request may close this issue.

2 participants