Skip to content

Commit

Permalink
fix calibrate fetching with wrong identifier (#4273)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwdchang authored Jul 26, 2024
1 parent 7aca0ed commit 7d96b6f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<section v-if="modelConfig && csvAsset" ref="outputPanel">
<template v-for="(cfg, index) of node.state.chartConfigs" :key="index">
<tera-chart-control
:chart-config="{ selectedRun: selectedRunId, selectedVariable: cfg }"
:chart-config="{ selectedRun: 'fixme', selectedVariable: cfg }"
:multi-select="false"
:show-remove-button="true"
:variables="Object.keys(pyciemssMap)"
Expand Down Expand Up @@ -242,14 +242,13 @@ const disableRunButton = computed(
);
const selectedOutputId = ref<string>();
const selectedRunId = computed(() => props.node.outputs.find((o) => o.id === selectedOutputId.value)?.value?.[0]);
let pyciemssMap: Record<string, string> = {};
const preparedCharts = computed(() => {
if (!selectedRunId.value) return [];
const state = props.node.state;
if (!state.calibrationId) return [];
// Merge before/after for chart
const { result, resultSummary } = mergeResults(
runResult.value,
Expand Down Expand Up @@ -486,7 +485,7 @@ watch(
selectedOutputId.value = props.node.active;
// Fetch saved intermediate state
const simulationObj = await getSimulation(selectedRunId.value);
const simulationObj = await getSimulation(props.node.state.calibrationId);
if (simulationObj?.updates) {
lossValues = simulationObj?.updates.map((d, i) => ({
iter: i,
Expand Down

0 comments on commit 7d96b6f

Please sign in to comment.