Skip to content

Commit 3f9df23

Browse files
committed
refactor: update extractRows function to use model_session_id instead of experiment_id
1 parent bcbef0c commit 3f9df23

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

DashAI/front/src/components/explainers/TrainedModelsTable.jsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,23 @@ function TrainedModelsTable() {
9999

100100
const extractRows = (rawExperiments, rawRuns) => {
101101
let rows = [];
102-
// A cada run agregarlo los datos de su experimento
102+
// A cada run agregarlo los datos de su model session
103103
rawRuns.forEach((run) => {
104104
let newRun = { ...run };
105-
const newExperiment = rawExperiments.filter(
106-
(experiment) => experiment.id === newRun.experiment_id,
105+
const modelSession = rawExperiments.filter(
106+
(session) => session.id === newRun.model_session_id,
107107
)[0];
108108

109+
if (!modelSession) {
110+
console.warn(`Model session not found for run ${newRun.id}`);
111+
return;
112+
}
113+
109114
const {
110115
name: experimentName,
111116
dataset_id: datasetId,
112117
task_name: taskName,
113-
} = newExperiment;
118+
} = modelSession;
114119
newRun = {
115120
...newRun,
116121
experimentName,

0 commit comments

Comments
 (0)