-
Notifications
You must be signed in to change notification settings - Fork 732
198 lines (182 loc) · 8.54 KB
/
nano_howto_guides_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
name: Nano Unit Tests for How-To Guides 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_howto_guides_tests.yml'
pull_request:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_howto_guides_tests.yml'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
nano-howto-guides-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 unit tests for Inference PyTorch how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-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 ipykernel==5.5.6
bash python/nano/tutorial/notebook/inference/pytorch/run-nano-howto-guides-inference-pytorch-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training PyTorch how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-pytorch -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-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
bash python/nano/tutorial/notebook/training/pytorch/run-nano-howto-guides-training-pytorch-tests.sh
bash python/nano/tutorial/notebook/preprocessing/pytorch/run-nano-howto-guides-preprocessing-pytorch-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-pytorch --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training PyTorch Lightning how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-pytorch-lightning -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-pytorch-lightning
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false pytorch
source bigdl-nano-init
pip install pytest nbmake
bash python/nano/tutorial/notebook/training/pytorch-lightning/run-nano-howto-guides-training-pytorch-lightning-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-pytorch-lightning --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-howto-guides-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 unit tests for Inference TensorFlow how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-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 ipykernel==5.5.6
bash python/nano/tutorial/notebook/inference/tensorflow/run-nano-howto-guides-inference-tensorflow-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run unit tests for Training TensorFlow how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-training-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-training-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 basic
source bigdl-nano-init
pip install pytest nbmake
pip install ipykernel==5.5.6
pip install tensorflow-datasets==4.4.0
pip install protobuf==3.19.5
pip install tensorflow-metadata==1.13.0
bash python/nano/tutorial/notebook/training/tensorflow/run-nano-howto-guides-training-tensorflow-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-training-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-howto-guides-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 unit tests for Inference OpenVINO how-to guides
shell: bash
run: |
$CONDA/bin/conda create -n howto-guides-inference-openvino -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate howto-guides-inference-openvino
$CONDA/bin/conda info
bash python/nano/dev/build_and_install.sh linux default false basic
source bigdl-nano-init
pip install pytest nbmake
pip install openvino-dev==2022.3.0
bash python/nano/tutorial/notebook/inference/openvino/run-nano-howto-guides-inference-openvino-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n howto-guides-inference-openvino --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
# TODO: Add test for /notebook/inference/openvino/accelerate_inference_openvino_gpu.ipynb
# when GPU is avaliable for action tests.
# For this notebook, we may need to install with options pytorch,tensorflow,inference