Skip to content
Snippets Groups Projects
print_config.py 395 B
Newer Older
Michał Pogoda's avatar
Michał Pogoda committed
"""Utility script for printing Hydra config."""

import hydra
from omegaconf import OmegaConf

@hydra.main(config_path="config", config_name="config")
def main(cfg):
Michał Pogoda's avatar
Michał Pogoda committed
    """Main function."""
    cfg_resolved = OmegaConf.to_container(cfg, resolve=True)
    cfg_resolved_json = json.dumps(cfg_resolved, indent=4)
    print(cfg_resolved_json)
if __name__ == "__main__":
    main()