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

Add support for _convert_='object' for Hydra 1.3.0 #336

Closed
rsokl opened this issue Nov 8, 2022 · 0 comments
Closed

Add support for _convert_='object' for Hydra 1.3.0 #336

rsokl opened this issue Nov 8, 2022 · 0 comments
Labels
enhancement New feature or request hydra/omegaconf Tied to behavior of hydra/omegaconf

Comments

@rsokl
Copy link
Contributor

rsokl commented Nov 8, 2022

See FR and merged PR in Hydra for additional details.

In short, starting with Hydra 1.3.0, hydra-zen's config-creation functions should support hydra_convert='object'. This signals to Hydra's instantiate that it is to convert resulting objects to instances of their backing dataclass

E.g.,

from hydra_zen import instantiate, builds, make_config

Conf = make_config(a=builds(dict, b=1), hydra_convert="object")  # should raise if local Hydra version is < 1.3.0
assert isinstance(instantiate(Conf), Conf)
@rsokl rsokl added enhancement New feature or request hydra/omegaconf Tied to behavior of hydra/omegaconf labels Nov 8, 2022
@rsokl rsokl added this to the hydra-zen 0.9.0 milestone Dec 9, 2022
@rsokl rsokl closed this as completed in 886429d Dec 30, 2022
rsokl added a commit that referenced this issue Dec 30, 2022
…vert

Closes #336 -- hydra_convert='object' is supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hydra/omegaconf Tied to behavior of hydra/omegaconf
Projects
None yet
Development

No branches or pull requests

1 participant