-
Notifications
You must be signed in to change notification settings - Fork 733
221 lines (206 loc) · 8.66 KB
/
nano_unit_tests_tensorflow.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
name: Nano Unit Tests Tensorflow
# 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 action 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_unit_tests_tensorflow.yml'
pull_request:
branches: [ main ]
paths:
- 'python/nano/**'
- '.github/workflows/nano_unit_tests_tensorflow.yml'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
nano-unit-test-tensorflow:
# 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"]
tf-version: [
"intel-tensorflow==2.7.0",
"intel-tensorflow==2.8.0",
"intel-tensorflow==2.9.1",
"intel-tensorflow==2.10.0",
"tensorflow==2.7.4",
"tensorflow==2.8.4",
"tensorflow==2.9.3",
"tensorflow==2.10.1"
]
# 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
sudo apt-get update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
- name: Run TensorFlow unit tests (train)
shell: bash
run: |
$CONDA/bin/conda create -n nano-tensorflow -y python==3.8.16
source $CONDA/bin/activate nano-tensorflow
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false basic
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-train-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n nano-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run TensorFlow unit tests (inference)
shell: bash
run: |
$CONDA/bin/conda create -n nano-tensorflow -y python==3.8.16
source $CONDA/bin/activate nano-tensorflow
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-inference-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n nano-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
nano-unit-test-tensorflow-deps:
# 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.7"]
tf-version: [
"intel-tensorflow==2.7.0",
"intel-tensorflow==2.8.0",
"intel-tensorflow==2.9.1",
"intel-tensorflow==2.10.0",
"tensorflow==2.7.4",
"tensorflow==2.8.4",
"tensorflow==2.9.3",
"tensorflow==2.10.1"
]
# 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@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install openmpi-bin openmpi-doc libopenmpi-dev
- name: Run TensorFlow unit tests (Horovod)
shell: bash
run: |
$CONDA/bin/conda create -n horovod-tf -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate horovod-tf
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false basic
HOROVOD_WITH_MPI=1 HOROVOD_WITH_TENSORFLOW=1 HOROVOD_WITHOUT_PYTORCH=1 pip install --no-cache-dir horovod==0.25.0
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-horovod-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n horovod-tf --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run TensorFlow unit tests (Ray)
shell: bash
run: |
$CONDA/bin/conda create -n ray-tf -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate ray-tf
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false basic
pip install pytest
# fix issue, see https://github.com/intel-analytics/BigDL/blob/main/docs/readthedocs/source/doc/Nano/Overview/known_issues.md#ray-issues
pip install google-api-core==2.8.2
pip install ray[default]==1.11.0 prometheus_client==0.13.0
source bigdl-nano-init
bash python/nano/test/run-nano-tf-ray-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n ray-tf --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run TensorFlow unit tests (Automl)
shell: bash
run: |
$CONDA/bin/conda create -n nano-automl-tf -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate nano-automl-tf
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false basic
pip install pytest
pip install ConfigSpace
pip install 'optuna<=3.1.1'
source bigdl-nano-init
bash python/nano/test/run-nano-automl-common-tests.sh
bash python/nano/test/run-nano-automl-tf-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n nano-automl-tf --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run TensorFlow unit tests (INC)
shell: bash
run: |
$CONDA/bin/conda create -n inc-tf -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate inc-tf
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-inc-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n inc-tf --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tensorflow unit tests (OpenVINO)
shell: bash
run: |
$CONDA/bin/conda create -n openvino-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate openvino-tensorflow
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-openvino-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n openvino-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}
- name: Run tensorflow unit tests (ONNX)
shell: bash
run: |
$CONDA/bin/conda create -n onnx-tensorflow -y python==3.8.16 setuptools=58.0.4
source $CONDA/bin/activate onnx-tensorflow
$CONDA/bin/conda info
pip install ${{matrix.tf-version}} tf2onnx==1.13.0
bash python/nano/dev/build_and_install.sh linux default false inference
pip install pytest
source bigdl-nano-init
bash python/nano/test/run-nano-tf-onnx-tests.sh
source $CONDA/bin/deactivate
$CONDA/bin/conda remove -n onnx-tensorflow --all
env:
ANALYTICS_ZOO_ROOT: ${{ github.workspace }}