forked from microsoft/responsible-ai-toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
173 lines (142 loc) · 5.21 KB
/
CI-e2e-notebooks-text-vision.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
name: CI e2e notebooks text vision
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "raiwidgets/**"
- "responsibleai_vision/**"
- "responsibleai_text/**"
- ".github/workflows/CI-e2e-notebooks-vision.yml"
- "libs/e2e/src/lib/describer/modelAssessment/**"
- "libs/interpret-vision/**"
- "libs/interpret-text/**"
- "notebooks/**"
jobs:
ui-build:
env:
node-version: 16.x
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install yarn
run: npm install yarn -g
- name: Install yarn dependencies
run: yarn install --frozen-lock-file
- name: Build Typescript
run: yarn buildall
- name: Upload the build result
uses: actions/upload-artifact@v3
with:
name: raiwidgets-js
path: raiwidgets/raiwidgets/widget
ci-e2e-notebook-text-vision:
needs: ui-build
env:
node-version: 16.x
strategy:
fail-fast: false
matrix:
# TODO: add macos
operatingSystem: [ubuntu-latest, windows-latest]
pythonVersion: [3.8, 3.9, "3.10"]
flights: [""]
notebookGroup: ["vis_nb_group_1", "text_nb_group_1"]
runs-on: ${{ matrix.operatingSystem }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
- name: Install yarn
run: npm install yarn -g
- name: Install yarn dependencies
run: yarn install --frozen-lock-file
- name: Download the UI build result
uses: actions/download-artifact@v2
with:
name: raiwidgets-js
path: raiwidgets/raiwidgets/widget
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.pythonVersion }}
- name: Install pytorch
shell: bash -l {0}
run: |
conda install --yes --quiet "pytorch==1.13.1" "torchvision<0.15" cpuonly "numpy<1.24.0" -c pytorch
- name: Setup tools
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools
pip install --upgrade "pip-tools<=7.1.0"
- name: Install backwards-compatible keras for transformers
shell: bash -l {0}
run: |
pip install tf-keras
pip install keras==2.15
- name: Install dependencies
shell: bash -l {0}
run: |
pip install captum
pip install -r requirements-dev.txt
pip install -v -e .
working-directory: raiwidgets
- if: ${{ matrix.notebookGroup == 'vis_nb_group_1'}}
name: Install vision dependencies
shell: bash -l {0}
run: |
pip install -r requirements-dev.txt
pip install .
working-directory: responsibleai_vision
- if: ${{ matrix.notebookGroup == 'text_nb_group_1'}}
name: Install text dependencies
shell: bash -l {0}
run: |
pip install -r requirements-dev.txt
pip install .
working-directory: responsibleai_text
- if: ${{ matrix.notebookGroup == 'text_nb_group_1'}}
name: Setup spacy
shell: bash -l {0}
run: |
python -m spacy download en_core_web_sm
- name: Pip freeze
shell: bash -l {0}
run: |
pip freeze > installed-requirements-dev.txt
cat installed-requirements-dev.txt
working-directory: raiwidgets
- name: Upload requirements
uses: actions/upload-artifact@v3
with:
name: requirements-dev.txt
path: raiwidgets/installed-requirements-dev.txt
# keep list of notebooks in sync with scripts/e2e-widget.js, create new notebook group if necessary
- if: ${{ matrix.notebookGroup == 'vis_nb_group_1'}}
name: Run widget tests
shell: bash -l {0}
run: |
yarn e2e-widget -n "responsibleaidashboard-fridge-image-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-fridge-multilabel-image-classification-model-debugging" -f ${{ matrix.flights }}
yarn e2e-widget -n "responsibleaidashboard-fridge-object-detection-model-debugging" -f ${{ matrix.flights }}
- if: ${{ matrix.notebookGroup == 'text_nb_group_1'}}
name: Run widget tests
shell: bash -l {0}
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-covid-event-multilabel-text-classification-model-debugging" -f ${{ matrix.flights }}
- name: Upload e2e test screen shot
if: always()
uses: actions/upload-artifact@v3
with:
name: raiwidgets-e2e-screen-shot
path: ./dist/cypress