-
Notifications
You must be signed in to change notification settings - Fork 732
235 lines (217 loc) · 10.3 KB
/
nano_notebooks_tests.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
name: Nano Unit Tests for Notebooks
# Cancel previous runs in the PR when you push new commits
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_notebooks_tests.yml'
pull_request:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_notebooks_tests.yml'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
nano-notebooks-pytorch-test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.8"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools==58.0.4
python -m pip install --upgrade wheel
- name: Run cifar10 notebooks PyTorch unit tests
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-trainer-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-trainer-pytorch
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch,inference
source bigdl-nano-init
pip install pytest nbmake
pip install lightning-bolts==0.5.0
bash python/nano/notebooks/pytorch/cifar10/run-nano-notebooks-pytorch-cifar10-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-trainer-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tutorial notebooks Pytorch unit tests
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-pytorch
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch,inference
source bigdl-nano-init
pip install pytest nbmake
pip install lightning-bolts==0.5.0
bash python/nano/notebooks/pytorch/tutorial/run-nano-notebooks-pytorch-tutorial-tests.sh false
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_onnx.sh
bash python/nano/tutorial/training/pytorch-lightning/run_nano_pytorch_lightning_test.sh
bash python/nano/tutorial/training/pytorch/run_nano_pytorch_test.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tutorial notebooks Pytorch unit tests(OpenVINO)
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-pytorch
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch
source bigdl-nano-init
pip install pytest nbmake
pip install ipykernel==5.5.6
pip install openvino-dev==2022.3.0
bash python/nano/notebooks/pytorch/tutorial/run-nano-notebooks-pytorch-tutorial-tests.sh true
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_openvino.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tutorial notebooks Pytorch unit tests(JIT+IPEX)
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-pytorch
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch
source bigdl-nano-init
pip install six
bash python/nano/tutorial/inference/pytorch/run_nano_pytorch_inference_tests_jit_ipex.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run realworld notebooks Pytorch unit tests(OpenVINO)
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-pytorch
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch
source bigdl-nano-init
pip install pytest nbmake
pip install ipykernel==5.5.6
pip install openvino-dev==2022.3.0
pip install matplotlib
bash python/nano/notebooks/pytorch/openvino/run-nano-notebooks-pytorch-openvino-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-notebooks-tensorflow-test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.8"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools==58.0.4
python -m pip install --upgrade wheel
- name: Run TensorFlow Example
run: |
$CONDA/bin/conda create -n example-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate example-tensorflow
pip install intel-tensorflow==2.9.1 tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
pip install tensorflow-datasets==4.4.0
pip install protobuf==3.19.5
pip install tensorflow-metadata==1.13.0
source bigdl-nano-init
bash python/nano/tutorial/training/tensorflow/run-nano-tensorflow-test.sh
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_quantization_inference_tests.sh
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_inference_tests_onnx.sh
bash python/nano/tutorial/inference/tensorflow/run_nano_tf_inference_tests_openvino.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n example-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tutorial notebooks TensorFlow unit tests
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-tensorflow
$CONDA/bin/conda info
pip install intel-tensorflow==2.9.1 tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
source bigdl-nano-init
pip install pytest nbmake
pip install jupyter nbconvert
pip install tensorflow-datasets==4.4.0
pip install protobuf==3.19.5
pip install tensorflow-metadata==1.13.0
bash python/nano/notebooks/tensorflow/tutorial/run-nano-notebooks-tensorflow-tutorial-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-notebooks-OpenVINO-test:
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.8"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools==58.0.4
python -m pip install --upgrade wheel
- name: Run tutorial notebooks OpenVINO unit tests
shell: bash
run: |
$CONDA/bin/conda create -n notebooks-tutorial-openvino -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate notebooks-tutorial-openvino
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false basic
source bigdl-nano-init
pip install openvino-dev==2022.3.0
bash python/nano/tutorial/inference/openvino/run_nano_openvino_inference_tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n notebooks-tutorial-openvino --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}