简体   繁体   中英

How to get the file path of a loaded OmegaConf configuration

I am using OmegaConf to read a.yaml configuration file (file path is given through hydra). After I edit it, I want to save the file again. Possibly using:

OmegaConf.save(conf, filepath, resolve=True)

However, I cannot figure out how to get the file path back in order to save it again.

Is it possible to get it from OmegaConf somehow? The OmegaConf documentation about serializing YAML does not return the same file path for me.

This is not supported. Hydra abstracts away the config files it loads. In fact - those config files may exist inside Python packages, the file system or arbitrary locations backed by specialized plugins.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM