Skip to content

Commit

Permalink
Update postbuild with changes in main (#1451)
Browse files Browse the repository at this point in the history
* fix error on machines with pyspark installed where passed dataframe is not spark pandas (#1415)

* add postbuild branch trigger (#1417)

* Fix causal UI strings according to classification/regression tasks (#1419)

* Fix causal UI strings according to classification/regression tasks

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix lint error

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix UI test

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix description for model overview (#1425)

* fix description for model overview

* keep new description for new model overview

* fix failing to create error report when filter_features is empty list (#1421)

* filter out missing values from what if dropdown to prevent explanation dashboard from crashing (#1418)

* Remove |Set Value| blurb in case it is not availble in counterfactual panel (#1426)

Signed-off-by: Gaurav Gupta <[email protected]>

* Add y-axis description to counterfactual feature importance chart (#1423)

Signed-off-by: Gaurav Gupta <[email protected]>

Co-authored-by: xuke444 <[email protected]>

* Add the user class name to causal UI strings (#1422)

* Fix causal UI strings according to classification/regression tasks

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix lint error

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix UI test

Signed-off-by: Gaurav Gupta <[email protected]>

* Add the user class name to causal UI strings

Signed-off-by: Gaurav Gupta <[email protected]>

Co-authored-by: xuke444 <[email protected]>

* fix math.min / max for array size more than 10^7 (#1427)

Signed-off-by: Ke Xu <[email protected]>

* upgrade pytest and lightgbm to try to fix random pytest segfault test failures (#1424)

s

* fix flaky notebook causing build failures by adding retry logic (#1431)

* Upper bound SciKit-Learn to address freeze in causal (#1432)

<!--- Provide a general summary of your changes in the Title above -->

## Description

Replaces #1429  to address #1430 . Causal analysis is getting stuck with the latest release of SciKit-Learn. This contains:

- Test case which gets stuck with SciKit-Learn 1.1.0
- Upper bound on SciKit-Learn in `requirements.txt`

## Checklist

<!--- Make sure to satisfy all the criteria listed below. -->

- [x] I have added screenshots above for all UI changes.
- [x] Documentation was updated if it was needed.
- [x] New tests were added or changes were manually verified.


Signed-off-by: Richard Edgar <[email protected]>

* fix dependency chart axis updating with incorrect values in explanation dashboard (#1437)

* fix codecov and widget test screenshot uploads (#1428)

* release raiwidgets and responsibleai v0.18.2 (#1439)

* fix (#1441)

Signed-off-by: vinutha karanth <[email protected]>

* Fix cohort name conflict and not run few tests for AML (#1442)

* fix

Signed-off-by: vinutha karanth <[email protected]>

* lintfix

Signed-off-by: vinutha karanth <[email protected]>

* Few e2e tests changes to accommodate AML static tests (#1445)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* Fix locators logic for string features -  data explorer and model statistics components (#1446)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* fix

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* lintfix

Signed-off-by: vinutha karanth <[email protected]>

* fix

Signed-off-by: vinutha karanth <[email protected]>

* Add more unittests RAI dashboard input class  (#1448)

* Add unit tests for ResponsibleAIDashboardInput

Signed-off-by: Gaurav Gupta <[email protected]>

* Add more tests

Signed-off-by: Gaurav Gupta <[email protected]>

* Fix imports

Signed-off-by: Gaurav Gupta <[email protected]>

* Address code review comments

Signed-off-by: Gaurav Gupta <[email protected]>

* Update the way to get the length of elements obtained in e2e tests (#1450)

* update

Signed-off-by: vinutha karanth <[email protected]>

* update

Signed-off-by: vinutha karanth <[email protected]>

* skip what-if create tests for AML

Signed-off-by: vinutha karanth <[email protected]>

Co-authored-by: Ilya Matiach <[email protected]>
Co-authored-by: Gaurav Gupta <[email protected]>
Co-authored-by: xuke444 <[email protected]>
Co-authored-by: Richard Edgar <[email protected]>
Co-authored-by: Vinutha Karanth <[email protected]>
  • Loading branch information
6 people authored May 26, 2022
1 parent d3591af commit 5863731
Show file tree
Hide file tree
Showing 26 changed files with 464 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
run: pytest --durations=10

- name: Upload a Build result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI-notebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
working-directory: raiwidgets

- name: Upload requirements
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: requirements-dev.txt
path: raiwidgets/installed-requirements-dev.txt
Expand All @@ -74,14 +74,14 @@ jobs:

- name: Upload notebook test result
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: notebook-test-${{ matrix.operatingSystem }}-${{ matrix.pythonVersion }}
path: notebooks

- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: raiwidgets-e2e-screen-shot
path: dist/cypress
4 changes: 2 additions & 2 deletions .github/workflows/CI-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
working-directory: ${{ matrix.packageDirectory }}

- name: Upload requirements
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: requirements-dev.txt
path: ${{ matrix.packageDirectory }}/requirements-dev.txt
Expand All @@ -67,7 +67,7 @@ jobs:
working-directory: ${{ matrix.packageDirectory }}

- name: Upload code coverage results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.packageDirectory }}-code-coverage-results
path: ${{ matrix.packageDirectory }}/htmlcov
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/CI-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@ jobs:
run: yarn ci
- name: Upload unit test code coverage
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: unit-test-coverage-${{ matrix.node-version }}
path: coverage
- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: e2e-screen-shot-${{ matrix.node-version }}
path: dist/cypress
- name: Upload yarn error
if: always()
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: yarn-error.log-${{ matrix.node-version }}
path: yarn-error.log
23 changes: 12 additions & 11 deletions .github/workflows/Ci-raiwigets-python-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,15 @@ jobs:
working-directory: ${{ matrix.packageDirectory }}

- name: Upload requirements
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: requirements-dev.txt
path: ${{ matrix.packageDirectory }}/installed-requirements-dev.txt

- name: Run widget tests
- if: ${{ matrix.operatingSystem != 'macos-latest' }}
name: Run widget tests
id: raiwidgettests
shell: bash -l {0}
if: ${{ matrix.operatingSystem != 'macos-latest' }}
run: yarn e2e-widget

- name: Run tests
Expand All @@ -106,13 +107,13 @@ jobs:
pytest --durations=10 --junitxml=junit/test-results.xml --cov=${{ matrix.packageDirectory }} --cov-report=xml --cov-report=html
working-directory: ${{ matrix.packageDirectory }}

- name: Upload code coverage results
uses: actions/upload-artifact@v2
# Only try to upload code cov if python tests were run
- if: ${{ (steps.raiwidgettests.outcome == 'success') }}
name: Upload code coverage results
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.packageDirectory }}-code-coverage-results
path: ${{ matrix.packageDirectory }}/htmlcov
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}

- if: ${{ (matrix.operatingSystem == 'windows-latest') && (matrix.pythonVersion == '3.8') }}
name: Upload to codecov
Expand Down Expand Up @@ -142,12 +143,12 @@ jobs:
name: codecov-umbrella
verbose: true

- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v2
- if: ${{ matrix.operatingSystem != 'macos-latest' }}
name: Upload e2e test screen shot
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.packageDirectory }}-e2e-screen-shot
path: dist/cypress
path: ./dist/cypress

- name: Set codecov status
if: ${{ (matrix.pythonVersion == '3.8') && (matrix.operatingSystem == 'windows-latest') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-rai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,19 +142,19 @@ jobs:
run: yarn e2e-widget

- name: Upload a raiwidgets build result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.widgetDirectory }}
path: ${{ env.widgetDirectory }}/dist/

- name: Upload a responsibleai build result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.raiDirectory }}
path: ${{ env.raiDirectory }}/dist/

- name: Upload a typescript build result
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: ${{ env.typescriptBuildArtifactName }}
path: ${{ env.typescriptBuildOutput }}
Expand Down
28 changes: 28 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,34 @@ this file to understand what changed.
- bug fixes
- other

## v0.18.2

- bug fixes and tests
- ## Responsible AI Dashboard
- Bug fixes on 'Set value' not copying over feature values correctly in what if counterfactual panel by @tongyu-microsoft in https://github.com/microsoft/responsible-ai-toolbox/pull/1416
- Fix description for model overview by @romanlutz in https://github.com/microsoft/responsible-ai-toolbox/pull/1425
- Fix math.min / max for array size more than 10^7 by @xuke444 in https://github.com/microsoft/responsible-ai-toolbox/pull/1427
- ## RAIInsights
- Add warning in counterfactual manager when unable to load explainer by @gaugup in https://github.com/microsoft/responsible-ai-toolbox/pull/1412
- ## Counterfactual
- Remove "Set Value" blurb in case it is not available in counterfactual panel by @gaugup in https://github.com/microsoft/responsible-ai-toolbox/pull/1426
- Add y-axis description to counterfactual feature importance chart by @gaugup in https://github.com/microsoft/responsible-ai-toolbox/pull/1423
- ## Causal
- Fix causal UI strings according to classification/regression tasks by @gaugup in https://github.com/microsoft/responsible-ai-toolbox/pull/1419
- Add the user class name to causal UI strings by @gaugup in https://github.com/microsoft/responsible-ai-toolbox/pull/1422
- Upper bound SciKit-Learn to address freeze in causal by @riedgar-ms in https://github.com/microsoft/responsible-ai-toolbox/pull/1432
- ## Error Analysis
- Fix error on machines with pyspark installed where passed dataframe is not spark pandas by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1415
- Fix failing to create error report when filter_features is empty list by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1421
- ## Interpret
- Filter out missing values from what if dropdown to prevent explanation dashboard from crashing by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1418
- Fix dependency chart axis updating with incorrect values in explanation dashboard by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1437
- ## other
- Add postbuild branch trigger by @romanlutz in https://github.com/microsoft/responsible-ai-toolbox/pull/1417
- Upgrade numpy to fix random segfault test failures by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1424
- Fix flaky notebook causing build failures by adding retry logic by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1431
- Fix codecov and widget test screenshot uploads by @imatiach-msft in https://github.com/microsoft/responsible-ai-toolbox/pull/1428

## v0.18.1

- educational materials
Expand Down
3 changes: 3 additions & 0 deletions libs/core-ui/src/lib/util/getDependencyChartOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export function getDependencyChartOptions(
type: "scatter",
zoomType: "xy"
},
custom: {
disableUpdate: true
},
plotOptions: {
scatter: {
marker: {
Expand Down
3 changes: 3 additions & 0 deletions libs/e2e/src/lib/describer/modelAssessment/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export enum Locators {
SortByDropdown = "#featureImportanceChartContainer div.ms-Dropdown-container",
SortByDropdownOptions = "div[class^='dropdownItemsWrapper'] button:contains('CohortCreateE2E')",
CreateNewCohortButton = "button:contains('New cohort')",
CohortEditPanel = "#cohortEditPanel",
CohortNameInput = "#cohortEditPanel input:eq(0)",
CohortDatasetValueInput = "#cohortEditPanel input[class^='ms-spinButton-input']",
CohortFilterSelection = "#cohortEditPanel [type='radio']",
Expand All @@ -43,6 +44,7 @@ export enum Locators {
WhatIfScatterChartYAxis = "#IndividualFeatureContainer div[class^='rotatedVerticalBox']",
WhatIfScatterChartFlyoutCancel = "#AxisConfigPanel button:contains('Cancel')",
WhatIfScatterChartFlyoutSelect = "#AxisConfigPanel button:contains('Select')",
WhatIfScatterChartSelectFeatureCaretButton = "#AxisConfigPanel i[data-icon-name='ChevronDown']",
WhatIfAxisPanel = "#AxisConfigPanel",
AxisFeatureDropdown = "#AxisConfigPanel div.ms-ComboBox-container",
AxisFeatureDropdownOption = "div.ms-ComboBox-optionsContainerWrapper button[role='option']",
Expand Down Expand Up @@ -89,6 +91,7 @@ export enum Locators {
CausalAnalysisHeader = "#ModelAssessmentDashboard #causalAnalysisHeader",
ErrorAnalysisHeader = "#ModelAssessmentDashboard #errorAnalysisHeader",
MSSideBarCards = "#OverallMetricChart div[class^='statsBox']",
AxisConfigPanel = "#AxisConfigPanel",
MSSideBarNumberOfBinsInput = "#AxisConfigPanel input[class^='ms-spinButton-input']",
MSScrollable = "#OverallMetricChart div[class^='scrollableWrapper']",
MSCohortDropdown = "#modelPerformanceCohortPicker",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ export function describeAggregateCausalAffects(
});

it("should render feature names on x-axis that are passed in from SDK", () => {
cy.get(Locators.CausalChartXAxisValues)
.its("length")
.should(
"be",
dataShape.causalAnalysisData?.featureListInCausalTable?.length
);
cy.get(Locators.CausalChartXAxisValues).should(
"have.length",
dataShape.causalAnalysisData?.featureListInCausalTable?.length
);
cy.get(`${Locators.CausalChartXAxisValues}`)
.last()
.invoke("text")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { generateId } from "../../../../util/generateId";
import { Locators } from "../Constants";
import { IModelAssessmentData } from "../IModelAssessmentData";

const cohortName = "CohortCreateE2E";
export function describeCohortFunctionality(
dataShape: IModelAssessmentData
): void {
Expand Down Expand Up @@ -34,15 +34,20 @@ export function describeCohortFunctionality(
});
it("Should update dataset selection with new cohort when a new cohort is created", () => {
cy.get(Locators.CreateNewCohortButton).click();
cy.get("#cohortEditPanel").should("exist");
cy.get(Locators.CohortEditPanel).should("exist");
const cohortName = `CohortCreateE2E-${generateId(4)}`;
cy.get(Locators.CohortNameInput).clear().type(cohortName);
cy.get(Locators.CohortFilterSelection).eq(1).check(); // select Dataset
cy.get(Locators.CohortDatasetValueInput)
.clear()
.type(dataShape.datasetExplorerData?.cohortDatasetNewValue || "");
cy.get(Locators.CohortEditPanel).then(($panel) => {
if ($panel.find(Locators.CohortDatasetValueInput).length > 0) {
cy.get(Locators.CohortDatasetValueInput)
.clear()
.type(dataShape.datasetExplorerData?.cohortDatasetNewValue || "");
}
});
cy.get(Locators.CohortAddFilterButton).click();
cy.get(Locators.CohortSaveAndSwitchButton).eq(0).click({ force: true });
cy.get(Locators.NewCohortSpan).should("exist");
cy.get(`span:contains(${cohortName})`).should("exist");

cy.get(Locators.DECohortDropdown).click();
cy.get(Locators.DEDropdownOptions).should("exist");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function describeGlobalExplanationChart<
const dependencePlotChart = new ScatterHighchart("#DependencePlot");
describe("DependencePlot", () => {
beforeEach(() => {
selectComboBox("#DependencePlotFeatureSelection", 0);
selectComboBox("#DependencePlotFeatureSelection", 3);
});
it("should render", () => {
expect(dependencePlotChart.Elements.length).greaterThan(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function describeIndividualFeatureImportance(
});
}
if (datasetShape.featureImportanceData?.hasFeatureImportanceComponent) {
describeTabularDataView(datasetShape);
describeTabularDataView(datasetShape, name);
}
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ export function describeSubBarChart(dataShape: IModelAssessmentData): void {
);
});
it("should have right number of x axis labels", () => {
cy.get(Locators.IFIXAxisValue)
.its("length")
.should("be", props.dataShape.featureNames?.length);
cy.get(Locators.IFIXAxisValue).should(
"have.length",
props.dataShape.featureNames?.length
);
});

it("should update x axis labels on changing top features by their importance number", () => {
Expand Down
Loading

0 comments on commit 5863731

Please sign in to comment.