From 719c33a7f96832aa3a9715d99ead9a45edd69fc5 Mon Sep 17 00:00:00 2001 From: Roman Shapovalov Date: Tue, 8 Nov 2022 15:58:41 -0800 Subject: [PATCH] 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 --- projects/implicitron_trainer/visualize_reconstruction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/implicitron_trainer/visualize_reconstruction.py b/projects/implicitron_trainer/visualize_reconstruction.py index e79ecb60..b1441fc5 100644 --- a/projects/implicitron_trainer/visualize_reconstruction.py +++ b/projects/implicitron_trainer/visualize_reconstruction.py @@ -138,7 +138,7 @@ def _get_config_from_experiment_directory(experiment_directory) -> DictConfig: cfg_file = os.path.join(experiment_directory, "expconfig.yaml") config = OmegaConf.load(cfg_file) # pyre-ignore[7] - return config + return OmegaConf.merge(get_default_args(Experiment), config) def main(argv) -> None: