omni-us / jsonargparse

Implement minimal boilerplate CLIs derived from type hints and parse from command line, config files and environment variables
https://jsonargparse.readthedocs.io
MIT License
314 stars 42 forks source link

Resolve later when using parser_mode="omegaconf" #461

Open roytseng-tw opened 6 months ago

roytseng-tw commented 6 months ago

🚀 Feature request

Provide an api like parser.resolve_omegaconf(...) to manually trigger the resolving on omegaconf node values.

Motivation

Current omegaconf mode has some limitations as described in the doc

The parser_mode='omegaconf' provides support for OmegaConf’s variable interpolation in a > single yaml file. It is not possible to do interpolation across multiple yaml files or in an isolated individual command line argument.

With the newly proposed api, after loading config from the file and command line, one can manually trigger value resolving across config file and command line arguments.

Pitch

Alternatives

mauvilsa commented 6 months ago

@roytseng-tw thank you for the proposal. The motivation isn't very clear. In the jsonargparse docs it does say that interpolation across config files is not supported, and a new feature could be to add support for it. However, why is it that you say "manually trigger" resolving? Why does this have to be manual? What are real use cases in which such a manual step is necessary?