From 8f225b4369a04f8e7361adf9e924c3c26e933f2c Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Mon, 2 Oct 2023 10:08:40 -0400 Subject: [PATCH 1/3] ckpt --- libs/core-ui/src/lib/DatasetCohort.ts | 2 +- .../Controls/FlyoutObjectDetection.tsx | 4 ++-- .../Context/buildModelAssessmentContext.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/core-ui/src/lib/DatasetCohort.ts b/libs/core-ui/src/lib/DatasetCohort.ts index 39d051396f..74f92049ed 100644 --- a/libs/core-ui/src/lib/DatasetCohort.ts +++ b/libs/core-ui/src/lib/DatasetCohort.ts @@ -141,7 +141,7 @@ export class DatasetCohort { dataDict[index][DatasetCohortColumns.PredictedY] = val; } }); - this.dataset.objectDetectionLabels?.forEach((val, index) => { + this.dataset.object_detection_labels?.forEach((val, index) => { dataDict[index][DatasetCohortColumns.ObjectDetectionIncorrect] = val.incorrect; dataDict[index][DatasetCohortColumns.ObjectDetectionCorrect] = diff --git a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx index a9ec4e9bd1..377a7a9f63 100644 --- a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx +++ b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx @@ -212,13 +212,13 @@ export class FlyoutObjectDetection extends React.Component< style={explanationImage} /> - ) : ( + ) : this.state.odSelectedKey !== "" ? ( - )} + ) : null} diff --git a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Context/buildModelAssessmentContext.ts b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Context/buildModelAssessmentContext.ts index feee0bc44a..a166e68a45 100644 --- a/libs/model-assessment/src/lib/ModelAssessmentDashboard/Context/buildModelAssessmentContext.ts +++ b/libs/model-assessment/src/lib/ModelAssessmentDashboard/Context/buildModelAssessmentContext.ts @@ -60,7 +60,7 @@ export function buildInitialModelAssessmentContext( featureMetaData: props.dataset.feature_metadata, localExplanations, metadata: modelMetadata, - objectDetectionLabels: props.dataset.objectDetectionLabels, + objectDetectionLabels: props.dataset.object_detection_labels, predictedProbabilities: props.dataset.probability_y, predictedY: props.dataset.predicted_y, targetColumn: props.dataset.target_column, From 4b5e516e8ec072a443a0f318a409031e8a141f23 Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Tue, 3 Oct 2023 09:29:02 -0400 Subject: [PATCH 2/3] ternary condition fix --- .../Controls/FlyoutObjectDetection.tsx | 24 ++++++++++++------- libs/localization/src/lib/en.json | 2 +- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx index 377a7a9f63..137c59924d 100644 --- a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx +++ b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx @@ -198,7 +198,7 @@ export class FlyoutObjectDetection extends React.Component< +this.state.odSelectedKey.slice( FlyoutODUtils.ExcessLabelLen ) - ] ? ( + ] && ( - ) : this.state.odSelectedKey !== "" ? ( - - - - ) : null} + )} + {this.state.odSelectedKey !== "" && + this.props.loadingExplanation[item.index][ + +this.state.odSelectedKey.slice( + FlyoutODUtils.ExcessLabelLen + ) + ] && ( + + + + )} diff --git a/libs/localization/src/lib/en.json b/libs/localization/src/lib/en.json index abb397adfc..31d16c2aa0 100644 --- a/libs/localization/src/lib/en.json +++ b/libs/localization/src/lib/en.json @@ -1449,7 +1449,7 @@ "labelVisibilityDropdown": "Select labels to display", "legendFailure": "failure", "legendSuccess": "success", - "loading": "Computing explanation for index", + "loading": "Computing explanation for image of index", "multiselect": "Multiselect", "notdefined": "object scenario not defined", "objectSelect": "Object Selection", From 976e611e91ad42adf6dd6579320184bd88637168 Mon Sep 17 00:00:00 2001 From: Advitya Gemawat Date: Tue, 3 Oct 2023 11:08:14 -0400 Subject: [PATCH 3/3] auto lint fixes --- .../Controls/FlyoutObjectDetection.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx index 137c59924d..5053f75d06 100644 --- a/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx +++ b/libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/FlyoutObjectDetection.tsx @@ -221,9 +221,7 @@ export class FlyoutObjectDetection extends React.Component< ] && ( )}