Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add forecasting to raiwidgets and add a forecasting notebook #2252

Merged
merged 199 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from 186 commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
6f16591
Add postga build trigger (#1755) (#1756)
gaugup Sep 29, 2022
a54a531
Merge branch 'main' into postga
gaugup Oct 3, 2022
7bb4087
Add model wrapper for wrapping predictions and test data (#1762)
gaugup Oct 5, 2022
8395b89
Merge branch 'main' into postga
gaugup Oct 7, 2022
c400c30
Merge branch 'main' into postga
gaugup Oct 7, 2022
d0d338e
Change description of cohort selection panel in Aggregate Feature Imp…
gaugup Oct 13, 2022
18af5ab
Support cohort filtering of string target in rai_insights (#1771)
gaugup Oct 18, 2022
c23be59
Simplify tests in test_cohort_filter.py (#1772)
gaugup Oct 18, 2022
3c9f037
Forecasting Dashboard
t-wangjohn Nov 18, 2022
a575a9d
remove unrelated file
romanlutz Dec 13, 2022
b7d18b6
basic set of changes to get it working again
romanlutz Dec 13, 2022
b14a162
Merge branch 't-wangjohn/forecasting' of https://github.com/microsoft…
romanlutz Dec 13, 2022
fa7c4e3
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Dec 13, 2022
59c89f7
forecasting_grains -> time_series_id_column_names
romanlutz Dec 13, 2022
77908d7
fix breaking changes in latest main, add quantile prediction, fix dat…
romanlutz Dec 16, 2022
4e6bd7e
fix UI components (including table and what-if creation, chart still …
romanlutz Dec 22, 2022
c193acc
get dashboard to work with multiple time series and switching back an…
romanlutz Dec 30, 2022
1f8f656
remove data explorer and model overview, create and edit cohort funct…
romanlutz Dec 30, 2022
c505871
lintfix
romanlutz Dec 31, 2022
98b0602
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 3, 2023
010b1e4
localizzation
romanlutz Jan 3, 2023
1b6cb73
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 4, 2023
19470a1
remove console.log
romanlutz Jan 4, 2023
f243a9c
remove question
romanlutz Jan 4, 2023
7a88711
remove unrelated changes, fix package.json
romanlutz Jan 4, 2023
d9820f7
string fixes and package.json adjustment
romanlutz Jan 4, 2023
fd3e796
localization
romanlutz Jan 4, 2023
e33def0
localization
romanlutz Jan 4, 2023
7211b97
more localization and removing of unrelated files
romanlutz Jan 4, 2023
0adeada
remove unrelated files
romanlutz Jan 4, 2023
031c62e
remove unrelated file changes
romanlutz Jan 4, 2023
ea3b991
remove is_forecasting_true_y
romanlutz Jan 4, 2023
fce894a
lintfix
romanlutz Jan 4, 2023
050f50b
Merge branch 'main' into romanlutz/forecasting_ui
romanlutz Jan 5, 2023
6c1d32a
add dropdown label
romanlutz Jan 5, 2023
3070799
Merge branch 'romanlutz/forecasting_ui' of https://github.com/microso…
romanlutz Jan 5, 2023
274d557
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 6, 2023
bc621f2
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 7, 2023
6ba1089
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 9, 2023
d459049
feature metadata input validation updates
romanlutz Jan 10, 2023
777522b
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 12, 2023
0dda1dc
cache transformation predictions
romanlutz Jan 12, 2023
64e250d
lintfix
romanlutz Jan 12, 2023
75c4e05
remove isUndefinedOrEmpty
romanlutz Jan 12, 2023
0698791
remove isUndefinedOrEmpty
romanlutz Jan 12, 2023
81eebd5
rename isAllDataCohort file as requested
romanlutz Jan 12, 2023
edea378
lintfix
romanlutz Jan 12, 2023
58c2347
Merge branch 'romanlutz/forecasting_ui' into romanlutz/forecasting
romanlutz Jan 12, 2023
17a4b36
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 12, 2023
15951a5
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 13, 2023
35b25e7
first draft of notebook
romanlutz Jan 13, 2023
eccffc1
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 13, 2023
201c7ec
get notebook to run, generate cohorts (not finished)
romanlutz Jan 14, 2023
002e412
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 14, 2023
faa2c80
ntoebook
romanlutz Jan 15, 2023
ea02f57
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 17, 2023
f9942f7
convert filter args and column names properly
romanlutz Jan 18, 2023
ea3ba88
fix datetime handling
romanlutz Jan 18, 2023
94bc57b
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 18, 2023
ef1f259
fix forecast request handling
romanlutz Jan 18, 2023
3918f32
working version for bug bash
romanlutz Jan 23, 2023
60fb6f1
add wheels
romanlutz Jan 23, 2023
1aba05b
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 23, 2023
b93167c
add UI changes
romanlutz Jan 23, 2023
5fdc1cc
update notebook to fix model download
romanlutz Jan 23, 2023
d922405
15 iterations
romanlutz Jan 23, 2023
0d728f7
lintfix
romanlutz Jan 25, 2023
dcfc60e
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 25, 2023
043621a
add example of operation method string
romanlutz Jan 25, 2023
943bbd5
add check for context
romanlutz Jan 25, 2023
bfa4085
add explanatory comment
romanlutz Jan 25, 2023
f37dc98
move description creation logic into getDescription
romanlutz Jan 25, 2023
8e1aed6
lintfix
romanlutz Jan 25, 2023
7156699
remove datetime_features from snapshot
romanlutz Jan 25, 2023
3eae678
Merge branch 'romanlutz/forecasting_ui_updates' into romanlutz/foreca…
romanlutz Jan 25, 2023
da5a730
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 26, 2023
48483c1
lintfix and other weirdnesses
romanlutz Jan 26, 2023
b44d1fc
undo print removal
romanlutz Jan 26, 2023
342b341
remove wheels, lintfix, small cleanup
romanlutz Jan 26, 2023
e48a8d6
use META_JSON directly instead of declaring a variable
romanlutz Jan 26, 2023
ddf7c81
move constants to common files and reuse
romanlutz Jan 27, 2023
a9614e1
lowercase f
romanlutz Jan 27, 2023
94b14db
isort
romanlutz Jan 27, 2023
7d0874d
Merge branch 'romanlutz/refactor_rai_insights' into romanlutz/forecas…
romanlutz Jan 27, 2023
f7e5314
remove datetime_features
romanlutz Jan 27, 2023
6d5472c
sktime notebook (1st half)
romanlutz Jan 27, 2023
283e5aa
isort
romanlutz Jan 27, 2023
cc6117d
debugging the notebook issue
romanlutz Jan 27, 2023
64306f5
use parentheses instead of backslashes
romanlutz Jan 27, 2023
21ca5f4
flake8
romanlutz Jan 27, 2023
8ffc6d2
isort
romanlutz Jan 27, 2023
749fbe9
Merge branch 'romanlutz/refactor_rai_insights' into romanlutz/forecas…
romanlutz Jan 27, 2023
bbfde99
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Jan 27, 2023
89cd994
sktime progress
romanlutz Jan 28, 2023
f140656
pre-unified RAIInsights commit
romanlutz Jan 28, 2023
f657ef4
pre-unified RAIInsights commit 2
romanlutz Jan 28, 2023
088b4b6
first pass over unification
romanlutz Jan 29, 2023
791e7eb
unify RAIInsights and RAIForecastingInsights
romanlutz Jan 30, 2023
6f1e303
adjustments to serialization
romanlutz Jan 31, 2023
bcd30f7
cleanup, test fixes, consolidation, TODO fixes
romanlutz Jan 31, 2023
388656e
fix tests
romanlutz Jan 31, 2023
ebfd33d
isort
romanlutz Jan 31, 2023
5823216
flake8
romanlutz Jan 31, 2023
bd029bb
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 1, 2023
64b876d
feature metadata and categorical_features consolidation
romanlutz Feb 1, 2023
04965e4
fix serialization of feature metadata
romanlutz Feb 1, 2023
dfc6f06
fix tests
romanlutz Feb 1, 2023
3eb8a1a
flake8
romanlutz Feb 1, 2023
aebc6e6
tests for feature metadata and cat features
romanlutz Feb 1, 2023
3b10d18
flake8
romanlutz Feb 1, 2023
bd6e26d
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 1, 2023
c41407d
remove remnants of RAIForecastingInsights
romanlutz Feb 1, 2023
20b9599
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 1, 2023
f1fe12d
fix string
romanlutz Feb 1, 2023
e212eac
Merge branch 'main' into romanlutz/categorical_features
romanlutz Feb 1, 2023
4be4266
move other utils back to rai insights
romanlutz Feb 1, 2023
e4bb39d
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 1, 2023
b4b9cfa
undo ModelTask import changes
romanlutz Feb 1, 2023
8c86a59
undo ModelTask references to raiutils
romanlutz Feb 1, 2023
276acf9
undo references to ModelTask in raituils
romanlutz Feb 1, 2023
af24275
remove raiutils changes since they're in a separate branch
romanlutz Feb 1, 2023
2d66c03
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 1, 2023
1253efd
datetime_features and time_series_id_features replacement
romanlutz Feb 2, 2023
2a5d146
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 2, 2023
60d47fd
pytest.mark.skip
romanlutz Feb 2, 2023
dc25fae
Merge branch 'romanlutz/categorical_features' into romanlutz/forecasting
romanlutz Feb 2, 2023
ea71a38
furthe datetime_features fixes
romanlutz Feb 2, 2023
c0d4319
TS ID col name fix
romanlutz Feb 2, 2023
be9d7f2
try out asfreq
romanlutz Feb 2, 2023
93d4870
notebook try asfreq interpolation
romanlutz Feb 2, 2023
18a4975
attempt to condense index into a single col
romanlutz Feb 3, 2023
9dd114c
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 3, 2023
4523222
add hidden feature flag, fix tests
romanlutz Feb 5, 2023
f9a092c
remove experimental file, isort
romanlutz Feb 5, 2023
077ed58
undo string change
romanlutz Feb 5, 2023
cbf2d05
restructure wrappers and field to file mapping code
romanlutz Feb 6, 2023
8750c8a
remove unnecessary TODO
romanlutz Feb 6, 2023
2e3345c
get AML notebook to work
romanlutz Feb 6, 2023
a8f3b7d
get AML notebook fully working
romanlutz Feb 6, 2023
25d4491
resolve some issues with sktime
romanlutz Feb 7, 2023
ba8baef
notebook
romanlutz Feb 7, 2023
7d79d5a
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 7, 2023
125498f
remove duplicated test case
romanlutz Feb 7, 2023
ce46964
flake8
romanlutz Feb 7, 2023
09ed45d
isort
romanlutz Feb 7, 2023
a1ca008
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 7, 2023
827836b
flalke8
romanlutz Feb 7, 2023
9bb8b77
wrap zip object with list
romanlutz Feb 8, 2023
51ce025
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 8, 2023
4ac4ed3
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Feb 25, 2023
22d76d9
use ModelTask from raiutils
romanlutz Feb 25, 2023
90e3f4f
remove prints
romanlutz Feb 25, 2023
6d88a27
flake8
romanlutz Feb 25, 2023
bec4c9f
isort
romanlutz Feb 25, 2023
372873e
use FORECASTING from raiutils.models
romanlutz Feb 27, 2023
53828fe
isort
romanlutz Feb 27, 2023
90dc631
fix sktime issue
romanlutz Feb 28, 2023
c256118
Merge branch 'romanlutz/forecasting_responsibleai' into romanlutz/for…
romanlutz Feb 28, 2023
c106b9b
get past Python errors
romanlutz Mar 1, 2023
20e7e07
fix predictions array shape
romanlutz Mar 2, 2023
ffcb0aa
fix UI-Python mismatch with renamed time and time series ID column na…
romanlutz Mar 2, 2023
6098c05
lintfix
romanlutz Mar 2, 2023
219be2f
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Mar 6, 2023
e61db55
undo changes that aren't needed any longer
romanlutz Mar 7, 2023
400491a
remove AML notebook
romanlutz Mar 7, 2023
55cabc9
update notebook by removing unnecessary content
romanlutz Mar 7, 2023
16f70b3
notebook tests, basic setup
romanlutz Mar 7, 2023
6926272
ids for tests
romanlutz Jul 4, 2023
e2ef735
Merge branch 'romanlutz/forecasting_model_server' into romanlutz/fore…
romanlutz Jul 4, 2023
6e33e6a
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 10, 2023
34bfbae
fix notebook based on latest changes in the repo
romanlutz Aug 11, 2023
13b7961
add test for adding a what if case
romanlutz Aug 14, 2023
857de5b
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 14, 2023
1716d31
Merge branch 'main' into romanlutz/forecasting_raiwidgets_and_notebook
romanlutz Aug 16, 2023
03e9968
flake8 and cleanup
romanlutz Aug 16, 2023
c3d09bf
isort
romanlutz Aug 16, 2023
7ba8ac6
lintfix
romanlutz Aug 17, 2023
3dd434d
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 17, 2023
908fa2f
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 18, 2023
1c0877b
fix test
romanlutz Aug 18, 2023
0344404
move notebook
romanlutz Aug 19, 2023
ff8b508
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 19, 2023
0737fa2
fix nb path
romanlutz Aug 20, 2023
8d9daaa
fix kernelspec
romanlutz Aug 20, 2023
c76d806
add pmdarima dependency
romanlutz Aug 21, 2023
788ffd4
Merge branch 'main' into romanlutz/forecasting_raiwidgets_and_notebook
romanlutz Aug 21, 2023
99d2e41
skip forecasting notebook on py 3.6
romanlutz Aug 21, 2023
ab7cd56
Merge branch 'main' into romanlutz/forecasting_raiwidgets_and_notebook
romanlutz Aug 21, 2023
ffebe8b
Merge branch 'romanlutz/forecasting_raiwidgets_and_notebook' of https…
romanlutz Aug 21, 2023
a9596f7
remove commented out line
romanlutz Aug 21, 2023
4e96d36
skip explanation
romanlutz Aug 21, 2023
a17a3bb
add reason kw arg name
romanlutz Aug 22, 2023
aaf3d35
lintfix
romanlutz Aug 22, 2023
73cd6a4
fix case for vision, text
romanlutz Aug 22, 2023
b2f9e96
fix syntax error
romanlutz Aug 22, 2023
8b0240e
fix python version comparison since it doesn't work with <=
romanlutz Aug 22, 2023
cbee66a
Merge branch 'main' of https://github.com/microsoft/responsible-ai-to…
romanlutz Aug 22, 2023
d990df7
Merge branch 'main' into romanlutz/forecasting_raiwidgets_and_notebook
romanlutz Aug 22, 2023
ea34b5b
Merge branch 'main' into romanlutz/forecasting_raiwidgets_and_notebook
romanlutz Aug 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/CI-e2e-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ jobs:
operatingSystem: [ubuntu-latest, windows-latest]
pythonVersion: [3.8, 3.9, "3.10"]
flights: ["", "dataBalanceExperience"]
notebookGroup: ["nb_group_1", "nb_group_2"]
notebookGroup: ["nb_group_1", "nb_group_2", "nb_group_3"]
exclude:
# nb_group_3 includes only forecasting which doesn't change
# with the data balance experience flight
- notebookGroup: "nb_group_3"
flights: "dataBalanceExperience"

runs-on: ${{ matrix.operatingSystem }}

Expand Down Expand Up @@ -127,6 +132,12 @@ jobs:
yarn e2e-widget -n "responsibleaidashboard-diabetes-decision-making" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-multiclass-dnn-model-debugging" -f ${{ matrix.flights }}

- if: ${{ matrix.notebookGroup == 'nb_group_3'}}
name: Run widget tests
shell: bash -l {0}
run: |
yarn e2e-widget -n "responsibleaidashboard-orange-juice-forecasting" -f ${{ matrix.flights }}

- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v3
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 {
describeWhatIfForecasting,
modelAssessmentDatasets
} from "@responsible-ai/e2e";

const datasetShape = modelAssessmentDatasets.OrangeJuiceForecasting;
describeWhatIfForecasting(datasetShape, "OrangeJuiceForecasting");
1 change: 1 addition & 0 deletions libs/e2e/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export * from "./lib/describer/modelAssessment/errorAnalysis/describeErrorAnalys
export * from "./lib/describer/modelAssessment/featureImportances/individualFeatureImportance/describeIndividualFeatureImportance";
export * from "./lib/describer/modelAssessment/modelOverview/describeModelOverview";
export * from "./lib/describer/modelAssessment/whatIfCounterfactuals/describeWhatIf";
export * from "./lib/describer/modelAssessment/whatIfForecasting/describeWhatIfForecasting";
export * from "./lib/describer/modelAssessment/datasets/modelAssessmentDatasets";
export * from "./lib/describer/modelAssessment/IModelAssessmentData";
export * from "./lib/describer/modelAssessment/visionDataExplorer/describeVisionDataExplorer";
Expand Down
16 changes: 16 additions & 0 deletions libs/e2e/src/lib/describer/modelAssessment/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,22 @@ export enum Locators {
AggregateBalanceMeasuresTable = "#aggregateBalanceMeasures .ms-DetailsList",
AggregateBalanceMeasuresTableColumns = "#aggregateBalanceMeasures .ms-DetailsList-headerWrapper div[aria-label]",
AggregateBalanceMeasuresTableRows = "#aggregateBalanceMeasures .ms-DetailsRow",
ForecastingDashboard = "#ModelAssessmentDashboard #ForecastingDashboard",
ForecastingTimeSeriesDropdown = "#ForecastingDashboard #ForecastingTimeSeriesDropdown",
ForecastingTimeSeriesDropdownOptions = "#ForecastingDashboard button[role='option']",
ForecastingTransformationCreationButton = "#ForecastingWhatIfTransformationCreationButton",
ForecastingTransformationsTable = "#ForecastingDashboard #ForecastingWhatIfTransformationsTable",
ForecastingTransformationValueField = "#ForecastingWhatIfTransformationValueField",
ForecastingTransformationNameField = "#ForecastingWhatIfTransformationNameField",
ForecastingTransformationAddButton = "#ForecastingWhatIfAddTransformationButton",
ForecastingTransformationFeatureDropdown = "#ForecastingWhatIfTransformationFeatureDropdown",
ForecastingTransformationFeatureDropdownOptions = "div.ms-ComboBox-optionsContainerWrapper button[role='option']",
ForecastingTransformationOperationDropdown = "#ForecastingWhatIfTransformationOperationDropdown",
ForecastingTransformationOperationDropdownWrapper = "#ForecastingWhatIfTransformationOperationDropdownwrapper",
ForecastingTransformationOperationDropdownOptions = "div.ms-ComboBox-optionsContainerWrapper button[role='option']",
ForecastingScenarioChart = "#ForecastingDashboard #ForecastScenarioChart",
ForecastingScenarioChartCurves = "#ForecastingDashboard .highcharts-series-group .highcharts-series",
ForecastingScenarioChartLegendItems = "#ForecastingDashboard .highcharts-a11y-proxy-button",
VisionDataExplorer = "#VisionDataExplorer",
VisionDataExplorerCohortDropDown = "#VisionDataExplorer #dataExplorerCohortDropdown",
VisionDataExplorerSearchBox = "#VisionDataExplorer #dataExplorerSearchBox",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface IModelAssessmentData {
dataBalanceData?: IDataBalanceData;
causalAnalysisData?: ICausalAnalysisData;
whatIfCounterfactualsData?: IWhatIfCounterfactualsData;
whatIfForecastingData?: IWhatIfForecastingData;
featureNames?: string[];
cohortDefaultName?: string;
checkDupCohort?: boolean;
Expand Down Expand Up @@ -174,6 +175,18 @@ export interface IWhatIfCounterfactualsData {
newClassValue?: string;
}

export interface IWhatIfForecastingData {
hasWhatIfForecastingComponent?: boolean;
numberOfTimeSeriesOptions?: number;
timeSeriesToSelect?: string;
testTransformation?: {
featureToSelect?: string;
operationToSelect?: string;
operationToSelectIndex?: number;
valueToSelect?: number;
};
}

export enum RAINotebookNames {
"CensusClassificationModelDebugging" = "responsibleaidashboard-census-classification-model-debugging.py",
"CensusClassificationModelDebuggingDataBalanceExperience" = "responsibleaidashboard-census-classification-model-debugging.py",
Expand All @@ -187,6 +200,8 @@ export enum RAINotebookNames {
"HousingDecisionMakingDataBalanceExperience" = "responsibleaidashboard-housing-decision-making.py",
"MulticlassDnnModelDebugging" = "responsibleaidashboard-multiclass-dnn-model-debugging.py",
"MulticlassDnnModelDebuggingDataBalanceExperience" = "responsibleaidashboard-multiclass-dnn-model-debugging.py",
"OrangeJuiceForecasting" = "responsibleaidashboard-orange-juice-forecasting.py",
"OrangeJuiceForecastingDataBalanceExperience" = "responsibleaidashboard-orange-juice-forecasting.py",
"FridgeImageClassificationModelDebugging" = "responsibleaidashboard-fridge-image-classification-model-debugging.py",
"FridgeMultilabelModelDebugging" = "responsibleaidashboard-fridge-multilabel-image-classification-model-debugging.py",
"FridgeObjectDetectionModelDebugging" = "responsibleaidashboard-fridge-object-detection-model-debugging.py"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export const OrangeJuiceForecasting = {
featureNames: [
"Advert",
"Price",
"Age60",
"COLLEGE",
"INCOME",
"Hincome150",
"Large HH",
"Minorities",
"WorkingWoman",
"SSTRDIST",
"SSTRVOL",
"CPDIST5",
"CPWVOL5"
],
whatIfForecastingData: {
hasWhatIfForecastingComponent: true,
numberOfTimeSeriesOptions: 9,
testTransformation: {
featureToSelect: "INCOME",
operationToSelect: "multiply",
operationToSelectIndex: 0,
valueToSelect: 10
},
timeSeriesToSelect: "Store = 8, Brand = tropicana"
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { HousingClassificationModelDebugging } from "./HousingClassificationMode
import { HousingDecisionMaking } from "./HousingDecisionMaking";
import { HousingRegression } from "./HousingRegression";
import { MulticlassDnnModelDebugging } from "./MulticlassDnnModelDebugging";
import { OrangeJuiceForecasting } from "./OrangeJuiceForecasting";

export const regExForNumbersWithBrackets = /^\((\d+)\)$/; // Ex: (60)

Expand All @@ -28,7 +29,8 @@ const modelAssessmentDatasets: { [name: string]: IModelAssessmentData } = {
HousingClassificationModelDebugging,
HousingDecisionMaking,
HousingRegression,
MulticlassDnnModelDebugging
MulticlassDnnModelDebugging,
OrangeJuiceForecasting
};

const modelAssessmentDatasetsDataBalanceExperience: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { visit } from "../../../../util/visit";
import { Locators } from "../Constants";
import { modelAssessmentDatasets } from "../datasets/modelAssessmentDatasets";
import { IModelAssessmentData } from "../IModelAssessmentData";

import { describeWhatIfForecastingCreate } from "./describeWhatIfForecastingCreate";
import { describeWhatIfForecastingCreateWhatIf } from "./describeWhatIfForecastingCreateWhatIf";

const testName = "What If Forecasting";

export function describeWhatIfForecasting(
datasetShape: IModelAssessmentData,
name?: keyof typeof modelAssessmentDatasets
): void {
describe(testName, () => {
before(() => {
visit(name);
cy.get("#ModelAssessmentDashboard").should("exist");
});
if (!datasetShape.whatIfForecastingData?.hasWhatIfForecastingComponent) {
it("should not have 'What-If Forecasting' component for the notebook", () => {
cy.get(Locators.ForecastingDashboard).should("not.exist");
});
} else {
describeWhatIfForecastingCreate(datasetShape);
describeWhatIfForecastingCreateWhatIf(datasetShape);
}
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

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

export function describeWhatIfForecastingCreate(
dataShape: IModelAssessmentData
): void {
describe("What if Forecasting Create", () => {
it("Should be able to select time series", () => {
cy.get(Locators.ForecastingScenarioChart).should("not.exist");
cy.get(Locators.ForecastingTimeSeriesDropdown).should("exist").click();
cy.get(Locators.ForecastingTimeSeriesDropdownOptions).should(
"have.length",
dataShape.whatIfForecastingData?.numberOfTimeSeriesOptions
);
// click again to close dropdown ahead of selectDropdown
cy.get(Locators.ForecastingTimeSeriesDropdown).click();
if (dataShape.whatIfForecastingData?.timeSeriesToSelect) {
selectDropdown(
Locators.ForecastingTimeSeriesDropdown,
dataShape.whatIfForecastingData?.timeSeriesToSelect
);
}

cy.get(Locators.ForecastingScenarioChart).should("exist");
cy.get(Locators.ForecastingScenarioChartCurves).should("have.length", 2);
});
});
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

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

export function describeWhatIfForecastingCreateWhatIf(
dataShape: IModelAssessmentData
): void {
describe("What if Forecasting Create What If", () => {
it("Should be able to create a what if scenario", () => {
cy.get(Locators.ForecastingTransformationNameField).should("not.exist");
cy.get(Locators.ForecastingTransformationCreationButton)
.should("exist")
.click();
cy.get(Locators.ForecastingTransformationNameField)
.should("exist")
.type("test");

cy.get(Locators.ForecastingTransformationFeatureDropdown)
.should("exist")
.click();
cy.get(Locators.ForecastingTransformationFeatureDropdownOptions).should(
"have.length",
dataShape.featureNames?.length
);
// click again to close dropdown ahead of selectComboBox
cy.get(Locators.ForecastingTransformationFeatureDropdown)
.should("exist")
.click();
if (
dataShape.whatIfForecastingData?.testTransformation?.featureToSelect
) {
selectDropdown(
Locators.ForecastingTransformationFeatureDropdown,
dataShape.whatIfForecastingData?.testTransformation?.featureToSelect
);
}
//cy.get(Locators.ForecastingTransformationOperationDropdown).should("exist").click();
romanlutz marked this conversation as resolved.
Show resolved Hide resolved
cy.get(Locators.ForecastingTransformationOperationDropdownWrapper)
.should("exist")
.click();
cy.get(Locators.ForecastingTransformationOperationDropdownOptions).should(
"have.length",
4
);
// click again to close dropdown ahead of selectComboBox
cy.get(Locators.ForecastingTransformationOperationDropdownWrapper)
.should("exist")
.click();
cy.get(
`${Locators.ForecastingTransformationOperationDropdown} button.ms-ComboBox-CaretDown-button`
)
.click()
.get(
`div.ms-ComboBox-optionsContainerWrapper button:eq(${dataShape.whatIfForecastingData?.testTransformation?.operationToSelectIndex})`
)
.click();

const transformationValue =
dataShape.whatIfForecastingData?.testTransformation?.valueToSelect?.toString();
if (transformationValue) {
cy.get(Locators.ForecastingTransformationValueField)
.should("exist")
.type(transformationValue);
}
cy.get(Locators.ForecastingTransformationAddButton)
.should("exist")
.click();
cy.get(Locators.ForecastingTransformationNameField).should("not.exist");

cy.get(Locators.ForecastingTransformationsTable).should("exist");

cy.get(Locators.ForecastingScenarioChart).should("exist");
cy.get(Locators.ForecastingScenarioChartCurves).should("have.length", 3);
});
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export class TransformationCreation extends React.Component<
}
</Label>
<ComboBox
id={"ForecastingWhatIfTransformationFeatureDropdown"}
errorMessage={
this.props.transformationFeature === undefined
? localization.Forecasting.TransformationCreation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class TransformationCreationContinuous extends React.Component<ITransform
}
</Label>
<ComboBox
id={"ForecastingWhatIfTransformationOperationDropdown"}
errorMessage={
this.props.transformationOperation === undefined
? localization.Forecasting.TransformationCreation
Expand Down Expand Up @@ -90,6 +91,7 @@ export class TransformationCreationContinuous extends React.Component<ITransform
}
</Label>
<TextField
id={"ForecastingWhatIfTransformationValueField"}
type="number"
step={this.transformationValueStep}
value={this.props.transformationValue.toString()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ export class TransformationCreationDialog extends React.Component<
>
<Stack.Item>
<TextField
id={"ForecastingWhatIfTransformationNameField"}
label={localization.Forecasting.TransformationCreation.nameLabel}
placeholder={
localization.Forecasting.TransformationCreation
Expand Down Expand Up @@ -155,6 +156,7 @@ export class TransformationCreationDialog extends React.Component<
</Stack>
<DialogFooter>
<PrimaryButton
id={"ForecastingWhatIfAddTransformationButton"}
disabled={
transformationCombinationErrorMessage !== undefined ||
this.getTransformationNameErrorMessage(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ export class WhatIfSection extends React.Component<IWhatIfSectionProps> {
<>
<Stack.Item>
<PrimaryButton
id={"ForecastingWhatIfTransformationCreationButton"}
disabled={false}
onClick={this.props.onClickWhatIfButton}
text={localization.Forecasting.TransformationCreation.title}
/>
</Stack.Item>

{this.props.transformations.size > 0 && (
<Stack.Item>
<Stack.Item id="ForecastingWhatIfTransformationsTable">
<TransformationsTable
transformations={this.props.transformations}
jointDataset={this.context.jointDataset}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class ForecastingDashboard extends React.Component<
<Stack
className={classNames.sectionStack}
tokens={{ childrenGap: "24px", padding: "0 0 100px 0" }}
id="ForecastingDashboard"
id={"ForecastingDashboard"}
>
<Stack.Item className={classNames.topLevelDescriptionText}>
<Text>{description}</Text>
Expand All @@ -116,6 +116,7 @@ export class ForecastingDashboard extends React.Component<
</Text>
) : (
<Dropdown
id={"ForecastingTimeSeriesDropdown"}
label={localization.Forecasting.timeSeries}
className={classNames.dropdown}
options={this.state.timeSeriesOptions}
Expand Down
Loading
Loading