Fix: visualisation with Enums fields in Configurables

Summary:
Enum fields cause the following to crash since they are loaded as strings:
```
config = OmegaConf.load(autodumped_cfg_file)
Experiment(**config)
```

It would be good to come up with the general solution but for now just fixing the visualisation script.

Reviewed By: bottler

Differential Revision: D41140426

fbshipit-source-id: 71c1c6b1fffe3b5ab1ca0114cfa3f0d81160278f
This commit is contained in:
Roman Shapovalov 2022-11-08 15:58:41 -08:00 committed by Facebook GitHub Bot
parent f3c1e0837c
commit 719c33a7f9

View File

@ -138,7 +138,7 @@ def _get_config_from_experiment_directory(experiment_directory) -> DictConfig:
cfg_file = os.path.join(experiment_directory, "expconfig.yaml") cfg_file = os.path.join(experiment_directory, "expconfig.yaml")
config = OmegaConf.load(cfg_file) config = OmegaConf.load(cfg_file)
# pyre-ignore[7] # pyre-ignore[7]
return config return OmegaConf.merge(get_default_args(Experiment), config)
def main(argv) -> None: def main(argv) -> None: