From 50dab56b8b209214672df68235bd7a7c88a07e78 Mon Sep 17 00:00:00 2001 From: "tom.mansion" Date: Wed, 10 Jul 2024 10:59:00 +0200 Subject: [PATCH 1/2] Object list experiments results are now clearly displayed --- .../dataAnalysis/algoProviders/Algorithms.vue | 13 ++++ .../algoProviders/Experiments.vue | 21 ++++- .../debiai/dataAnalysis/common/DataTable.vue | 78 +++++++++++++++++++ 3 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 frontend/src/components/debiai/dataAnalysis/common/DataTable.vue diff --git a/frontend/src/components/debiai/dataAnalysis/algoProviders/Algorithms.vue b/frontend/src/components/debiai/dataAnalysis/algoProviders/Algorithms.vue index 2dfa6e074..cad30008a 100644 --- a/frontend/src/components/debiai/dataAnalysis/algoProviders/Algorithms.vue +++ b/frontend/src/components/debiai/dataAnalysis/algoProviders/Algorithms.vue @@ -283,6 +283,19 @@ export default { }); this.algoToUse = null; + if (typeof results === "string") { + try { + // Convert to object if it's a string + // Replace 'Infinity' to avoid JSON.parse error + results = results + .replace(/ -Infinity/g, '"-Infinity"') + .replace(/ Infinity/g, '"Infinity"'); + results = JSON.parse(results); + } catch (error) { + throw new Error("Results are not a valid JSON object"); + } + } + const experiment = { results, inputs, diff --git a/frontend/src/components/debiai/dataAnalysis/algoProviders/Experiments.vue b/frontend/src/components/debiai/dataAnalysis/algoProviders/Experiments.vue index 5c908283c..c504792fb 100644 --- a/frontend/src/components/debiai/dataAnalysis/algoProviders/Experiments.vue +++ b/frontend/src/components/debiai/dataAnalysis/algoProviders/Experiments.vue @@ -181,7 +181,18 @@ {{ result.name }} + + + {{ result.value.length }} elements {{ result.value.slice(0, 5) }}... @@ -216,8 +227,13 @@ + + From f126b0fcaa0dab12db11879b2a81098ba7f45025 Mon Sep 17 00:00:00 2001 From: "tom.mansion" Date: Wed, 10 Jul 2024 11:05:12 +0200 Subject: [PATCH 2/2] 0.28.0-beta2 --- backend/swagger.yaml | 2 +- frontend/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/swagger.yaml b/backend/swagger.yaml index ad28f5784..dccb09af7 100644 --- a/backend/swagger.yaml +++ b/backend/swagger.yaml @@ -1,6 +1,6 @@ swagger: "2.0" info: - version: 0.28.0-beta1 + version: 0.28.0-beta2 title: DebiAI_BACKEND_API description: DebiAI backend api contact: diff --git a/frontend/package.json b/frontend/package.json index 0001f651c..4a3f86dd9 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "debiai_frontend", - "version": "0.28.0-beta1", + "version": "0.28.0-beta2", "description": "Frontend for Debiai, made with Vuejs", "license": "Apache-2.0", "scripts": {