From e52e4fc9a39814b905ca37bacb690f7d7b0392fd Mon Sep 17 00:00:00 2001 From: David Joy <10147749+dmjoy@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:21:24 -0400 Subject: [PATCH] Quickfix for alignment target conversion when loading from hydra config --- align_system/cli/run_align_system.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/align_system/cli/run_align_system.py b/align_system/cli/run_align_system.py index 382f8ac..4cccd02 100644 --- a/align_system/cli/run_align_system.py +++ b/align_system/cli/run_align_system.py @@ -137,8 +137,9 @@ def _compute_time_stats(times_s): # some nested conversion to dict (from OmegaConf objects) # otherwise this can cause some downstream issues with # serialization - alignment_target.kdma_values = [OmegaConf.to_container(c) for c in - alignment_target.kdma_values] + alignment_target.kdma_values = [OmegaConf.to_container(c) + if isinstance(c, DictConfig) else c + for c in alignment_target.kdma_values] elif cfg.align_to_target: alignment_target = scenario.get_alignment_target() else: