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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OmegaConf.resolve cannnot resolve a dictionary #1165

Open
4 tasks done
miaopas opened this issue Mar 13, 2024 · 0 comments
Open
4 tasks done

OmegaConf.resolve cannnot resolve a dictionary #1165

miaopas opened this issue Mar 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@miaopas
Copy link

miaopas commented Mar 13, 2024

Describe the bug
For a custom resolver that returns a dictionary, OmegaConf.resolve report error, but other functions like OmegaConf.to_container(cfg, resolve=True) will work

To Reproduce

OmegaConf.register_new_resolver('foo', lambda x: {x: 1}, replace=True)

c = """
key1: poly # (smooth, nonsmooth)
key2: ${foo:${key1}}
"""
cfg = OmegaConf.create(c)

# Works
OmegaConf.to_container(cfg, resolve=True) 

# Not working
OmegaConf.resolve(cfg)

Expected behavior
OmegaConf.resolve should also work in this case?

Additional context

  • OmegaConf version: 2.3.0
  • Python version: 3.10.12
  • Operating system: Ubuntu 22.04.4
  • Please provide a minimal repro
@miaopas miaopas added the bug Something isn't working label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant