From 3b15a616c8ff0edac6a2530319e60decb9dcd8d1 Mon Sep 17 00:00:00 2001 From: Tom Szendrey Date: Wed, 20 Nov 2024 11:37:29 -0500 Subject: [PATCH 1/3] we should not redefine every row... --- .../calibrate-ensemble-ciemss/calibrate-ensemble-util.ts | 7 ++++--- .../ops/simulate-ensemble-ciemss/simulate-ensemble-util.ts | 4 +--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts index 106127396b..8909353eeb 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts +++ b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts @@ -60,12 +60,13 @@ export function formatCalibrateModelConfigurations( // 2. format the solution mappings rows.forEach((row) => { Object.entries(row.modelConfigurationMappings).forEach(([key, value]) => { + console.log(key); + console.log(value); if (!ensembleModelConfigMap[key]) return; - ensembleModelConfigMap[key].solutionMappings = { - [row.datasetMapping]: value - }; + ensembleModelConfigMap[key].solutionMappings[row.datasetMapping] = value; }); }); + console.log([...Object.values(ensembleModelConfigMap)]); return [...Object.values(ensembleModelConfigMap)]; } diff --git a/packages/client/hmi-client/src/components/workflow/ops/simulate-ensemble-ciemss/simulate-ensemble-util.ts b/packages/client/hmi-client/src/components/workflow/ops/simulate-ensemble-ciemss/simulate-ensemble-util.ts index 5642622f8f..7772a68e4b 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/simulate-ensemble-ciemss/simulate-ensemble-util.ts +++ b/packages/client/hmi-client/src/components/workflow/ops/simulate-ensemble-ciemss/simulate-ensemble-util.ts @@ -24,9 +24,7 @@ export function formatSimulateModelConfigurations( rows.forEach((row) => { Object.entries(row.modelConfigurationMappings).forEach(([key, value]) => { if (!ensembleModelConfigMap[key]) return; - ensembleModelConfigMap[key].solutionMappings = { - [row.newName]: value - }; + ensembleModelConfigMap[key].solutionMappings[row.newName] = value; }); }); From 9397a1db12b8124b68065965154831fb415556c4 Mon Sep 17 00:00:00 2001 From: Tom Szendrey Date: Wed, 20 Nov 2024 11:39:16 -0500 Subject: [PATCH 2/3] remove console --- .../ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts index 8909353eeb..04c7340190 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts +++ b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts @@ -60,8 +60,6 @@ export function formatCalibrateModelConfigurations( // 2. format the solution mappings rows.forEach((row) => { Object.entries(row.modelConfigurationMappings).forEach(([key, value]) => { - console.log(key); - console.log(value); if (!ensembleModelConfigMap[key]) return; ensembleModelConfigMap[key].solutionMappings[row.datasetMapping] = value; }); From 06a42d03026e88981bf898bf64fb4aae817342c1 Mon Sep 17 00:00:00 2001 From: Tom Szendrey Date: Wed, 20 Nov 2024 11:39:37 -0500 Subject: [PATCH 3/3] remove console --- .../ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts index 04c7340190..9388bbc6eb 100644 --- a/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts +++ b/packages/client/hmi-client/src/components/workflow/ops/calibrate-ensemble-ciemss/calibrate-ensemble-util.ts @@ -65,6 +65,5 @@ export function formatCalibrateModelConfigurations( }); }); - console.log([...Object.values(ensembleModelConfigMap)]); return [...Object.values(ensembleModelConfigMap)]; }