Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix calibrate fetching with wrong identifier #4273

Merged
merged 2 commits into from
Jul 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading