Skip to content

Commit

Permalink
add e2e UI notebook tests to covid19 event multilabel text classifica…
Browse files Browse the repository at this point in the history
…tion notebook
  • Loading branch information
imatiach-msft committed Aug 25, 2023
1 parent 998097f commit 0df57ef
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/CI-e2e-notebooks-text-vision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
run: |
yarn e2e-widget -n "responsibleaidashboard-DBPedia-text-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-covid19-event-multilabel-text-classification-model-debugging" -f ${{ matrix.flights }}
- name: Upload e2e test screen shot
if: always()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import {
describeDatasetExplorer,
modelAssessmentDatasets
} from "@responsible-ai/e2e";
const datasetShape =
modelAssessmentDatasets.CovidTextClassificationModelDebugging;
describeDatasetExplorer(datasetShape, "CovidTextClassificationModelDebugging");
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import {
describeErrorAnalysis,
modelAssessmentDatasets
} from "@responsible-ai/e2e";

const datasetShape =
modelAssessmentDatasets.CovidTextClassificationModelDebugging;
describeErrorAnalysis(datasetShape, "CovidTextClassificationModelDebugging");
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import {
describeModelOverview,
modelAssessmentDatasets
} from "@responsible-ai/e2e";
const datasetShape =
modelAssessmentDatasets.CovidTextClassificationModelDebugging;
describeModelOverview(datasetShape, "CovidTextClassificationModelDebugging");
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,6 @@ export enum RAINotebookNames {
"FridgeMultilabelModelDebugging" = "responsibleaidashboard-fridge-multilabel-image-classification-model-debugging.py",
"FridgeObjectDetectionModelDebugging" = "responsibleaidashboard-fridge-object-detection-model-debugging.py",
"DBPediaTextClassificationModelDebugging" = "responsibleaidashboard-DBPedia-text-classification-model-debugging.py",
"BlbooksgenreTextClassificationModelDebugging" = "responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.py"
"BlbooksgenreTextClassificationModelDebugging" = "responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging.py",
"CovidTextClassificationModelDebugging" = "responsibleaidashboard-covid19-event-multilabel-text-classification-model-debugging.py"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export const CovidTextClassificationModelDebugging = {
causalAnalysisData: {
hasCausalAnalysisComponent: false
},
checkDupCohort: true,
cohortDefaultName: "All data",
dataBalanceData: {
aggregateBalanceMeasuresComputed: false,
distributionBalanceMeasuresComputed: false,
featureBalanceMeasuresComputed: false
},
errorAnalysisData: {
hasErrorAnalysisComponent: true
},
featureImportanceData: {
hasFeatureImportanceComponent: false
},
featureNames: ["text"],
isTextClassification: true,
modelOverviewData: {
featureCohortView: {
firstFeatureToSelect: "positive_words",
multiFeatureCohorts: 3,
secondFeatureToSelect: "negative_words",
singleFeatureCohorts: 3
},
hasModelOverviewComponent: true,
initialCohorts: [
{
metrics: {
accuracy: "0.95",
precision: "0.944",
recall: "1"
},
name: "All data",
sampleSize: "20"
}
],
newCohort: {
metrics: {
accuracy: "0.947",
precision: "0.941",
recall: "1"
},
name: "CohortCreateE2E-text-classification",
sampleSize: "19"
}
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { IModelAssessmentData } from "../IModelAssessmentData";

import { BlbooksgenreTextClassificationModelDebugging } from "./BlbooksgenreTextClassificationModelDebugging";
import { CensusClassificationModelDebugging } from "./CensusClassificationModelDebugging";
import { CovidTextClassificationModelDebugging } from "./CovidTextClassificationModelDebugging";
import { DBPediaTextClassificationModelDebugging } from "./DBPediaTextClassificationModelDebugging";
import { DiabetesDecisionMaking } from "./DiabetesDecisionMaking";
import { DiabetesRegressionModelDebugging } from "./DiabetesRegressionModelDebugging";
Expand All @@ -24,6 +25,7 @@ export const regExForNumbersWithBrackets = /^\((\d+)\)$/; // Ex: (60)
const modelAssessmentDatasets: { [name: string]: IModelAssessmentData } = {
BlbooksgenreTextClassificationModelDebugging,
CensusClassificationModelDebugging,
CovidTextClassificationModelDebugging,
DBPediaTextClassificationModelDebugging,
DiabetesDecisionMaking,
DiabetesRegressionModelDebugging,
Expand Down
5 changes: 2 additions & 3 deletions scripts/e2e-widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ const visionFileNames = [
];
const textFileNames = [
"responsibleaidashboard-DBPedia-text-classification-model-debugging",
"responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging"
];
const ignoredFiles = [
"responsibleaidashboard-blbooksgenre-binary-text-classification-model-debugging",
"responsibleaidashboard-covid19-event-multilabel-text-classification-model-debugging"
];
const ignoredFiles = [];
const fileNames = tabularFileNames
.concat(visionFileNames)
.concat(textFileNames);
Expand Down

0 comments on commit 0df57ef

Please sign in to comment.