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

[Bug] Interpolation in Hydra config node not working correctly #1335

Closed
omry opened this issue Jan 26, 2021 · 1 comment · Fixed by #1336
Closed

[Bug] Interpolation in Hydra config node not working correctly #1335

omry opened this issue Jan 26, 2021 · 1 comment · Fixed by #1336
Labels
bug Something isn't working

Comments

@omry
Copy link
Collaborator

omry commented Jan 26, 2021

repro:

from omegaconf import DictConfig
import hydra
from hydra.core.hydra_config import HydraConfig

@hydra.main(config_name="config")
def experiment(_cfg: DictConfig) -> None:
    print(HydraConfig.get().job_logging.handlers.file.filename)


if __name__ == "__main__":
    experiment()

Output:

Traceback (most recent call last):
  File "/home/omry/dev/hydra/examples/configure_hydra/job_name/with_config_file_override.py", line 10, in experiment
    print(HydraConfig.get().job_logging.handlers.file.filename)
omegaconf.errors.ConfigKeyError: str interpolation key 'hydra.job.name' not found
	full_key: hydra.job_logging.handlers.file.filename
	reference_type=Any
	object_type=dict
@omry omry added the bug Something isn't working label Jan 26, 2021
@omry
Copy link
Collaborator Author

omry commented Jan 26, 2021

This is backported to Hydra 1.0 (#1338) and will be released with 1.0.6.

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

Successfully merging a pull request may close this issue.

1 participant