Skip to content

Type Hinting for Structured Configs #1186

Closed Answered by omry
abefrandsen asked this question in Q&A
Discussion options

You must be logged in to vote

The recommended practice is the second approach (duck typing).
If you really need the underlying object type to match, you can convert the OmegaConf config to object.
See OmegaConf.to_container and OmegaConf.to_object (which is a syntactic sugar using to_container).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by abefrandsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants