How to I get the full key of a config? #1062
-
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.
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.
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.