Skip to content

How to use is_interpolation on nested config? #1074

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

You must be logged in to vote

You need to operate on the parent Node.
Something like:

OmegaConf.is_interpolation(cfg.bar, "bla")

If you want to drill in programmatically , you can use OmegaConf.select to select the parent node first:
e.g, to check if foo.bar.baz.biz is an interpolation:

node = OmegaConf.select(cfg, "foo.bar.baz")
OmegaConf.is_interpolation(node, "biz")

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@merelcht
Comment options

Answer selected by merelcht
Comment options

You must be logged in to vote
0 replies
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