How to I get the full key of a config? #1062
Answered
by
omry
Drunk-Creator
asked this question in
Q&A
-
I have a yaml file which has nested structure as indicated below, when accessing the values via omegaconf, how would I also get the full key path? For example, if I have a function that access fruits:
apple:
price: 3.99
status: green
contract: 15-12-2025
orange:
price: 4.99
status: red
contract: 22-10-2023 |
Beta Was this translation helpful? Give feedback.
Answered by
omry
Apr 18, 2023
Replies: 1 comment 1 reply
-
Not sure I understand your question. Also, you might be interested in OmegaConf.select() that can select values using a dot string. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Drunk-Creator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure I understand your question.
You would print it as
print('fruits.apple.price')
:).I am sure it's not what you mean. Feel free to shed some more light here.
Also, you might be interested in OmegaConf.select() that can select values using a dot string.