Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add a resolve flag to when using --cfg to output the config #1585

Closed
davidcian opened this issue Apr 29, 2021 · 3 comments 路 Fixed by #1616
Closed

[Feature Request] Add a resolve flag to when using --cfg to output the config #1585

davidcian opened this issue Apr 29, 2021 · 3 comments 路 Fixed by #1616
Assignees
Labels
enhancement Enhanvement request
Milestone

Comments

@davidcian
Copy link

馃殌 Feature Request

Add some way to print the resolved configuration (for interpolations) when using the --cfg flag in the CLI.

Motivation

Is your feature request related to a problem? Please describe.

OmegaConf evaluates interpolated values lazily, which is a bummer when using the --cfg flag to output the config for debug purposes, since the values just print un-interpolated.

Pitch

Describe the solution you'd like
An extra flag, maybe --resolve in the CLI to print the resolved configuration.

Describe alternatives you've considered

An alternative is to just use print(OmegaConf.to_yaml(cfg, resolve=True)) in the code, but it would be better to not clutter the code with such a statement.

Are you willing to open a pull request? (See CONTRIBUTING)

Yes, but I'd need a pointer for where to look in the code.

@davidcian davidcian added the enhancement Enhanvement request label Apr 29, 2021
@jieru-hu jieru-hu added this to the Hydra 1.1.0 milestone Apr 30, 2021
@jieru-hu
Copy link
Contributor

Thanks @davidcian for the request! We will look into adding this for Hydra 1.1

@jieru-hu jieru-hu assigned jieru-hu and unassigned jieru-hu May 11, 2021
@Jasha10
Copy link
Collaborator

Jasha10 commented May 11, 2021

FYI I am working on this currently.

@jieru-hu
Copy link
Contributor

thanks @Jasha10, I tried to assign the issue to you on GitHub but it won't let me 馃 , then I ended up clicking the wrong button and accidentally assigned it to myself 馃槀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhanvement request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants