-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
fast-test.yml
221 lines (179 loc) · 6.11 KB
/
fast-test.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
# To reduce debug cost, steps are sorted differently on each platform,
# so that a bug in any module will cause at least one platform to fail quickly.
jobs:
- job: 'ubuntu_latest'
pool:
# FIXME: In ubuntu-20.04 Python interpreter crashed during SMAC UT
vmImage: 'ubuntu-18.04'
# This platform tests lint and doc first.
steps:
- script: |
set -e
python3 -m pip install -U --upgrade pip setuptools
python3 -m pip install -U pytest coverage
python3 -m pip install -U pylint flake8
echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
displayName: 'Install Python tools'
- script: |
python3 setup.py develop
displayName: 'Install NNI'
- script: |
set -e
cd ts/nni_manager
yarn eslint
cd ../webui
yarn eslint
displayName: 'ESLint'
- script: |
set -e
sudo apt-get install -y pandoc
python3 -m pip install -U --upgrade pygments
python3 -m pip install -U torch==1.7.0+cpu torchvision==0.8.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
python3 -m pip install -U tensorflow==2.3.1
python3 -m pip install -U keras==2.4.2
python3 -m pip install -U gym onnx peewee thop
python3 -m pip install -U sphinx==1.8.3 sphinx-argparse==0.2.5 sphinx-markdown-tables==0.0.9 sphinx-rtd-theme==0.4.2 sphinxcontrib-websupport==1.1.0 recommonmark==0.5.0 nbsphinx
sudo apt-get install swig -y
nnictl package install --name=SMAC
nnictl package install --name=BOHB
displayName: 'Install extra dependencies'
- script: |
set -e
python3 -m pylint --rcfile pylintrc nni
python3 -m flake8 nni --count --select=E9,F63,F72,F82 --show-source --statistics
EXCLUDES=examples/trials/mnist-nas/*/mnist*.py,examples/trials/nas_cifar10/src/cifar10/general_child.py
python3 -m flake8 examples --count --exclude=$EXCLUDES --select=E9,F63,F72,F82 --show-source --statistics
displayName: 'pylint and flake8'
- script: |
cd docs/en_US
sphinx-build -M html . _build -W --keep-going -T
displayName: 'Check Sphinx documentation'
- script: |
cd test
python3 -m pytest ut
displayName: 'Python unit test'
- script: |
set -e
cd ts/nni_manager
yarn test
cd ../nasui
CI=true yarn test
displayName: 'TypeScript unit test'
- script: |
cd test
python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'Simple integration test'
- job: 'ubuntu_legacy'
pool:
vmImage: 'ubuntu-18.04'
# This platform runs integration test first.
steps:
- script: |
set -e
python3 -m pip install -U --upgrade pip setuptools
python3 -m pip install -U pytest coverage
echo "##vso[task.setvariable variable=PATH]${HOME}/.local/bin:${PATH}"
displayName: 'Install Python tools'
- script: |
python3 setup.py develop
displayName: 'Install NNI'
- script: |
set -e
python3 -m pip install -U torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
python3 -m pip install -U tensorflow==1.15.2
python3 -m pip install -U keras==2.1.6
python3 -m pip install -U gym onnx peewee
sudo apt-get install swig -y
nnictl package install --name=SMAC
nnictl package install --name=BOHB
displayName: 'Install extra dependencies'
- script: |
cd test
python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'Simple integration test'
- script: |
cd test
python3 -m pytest ut
displayName: 'Python unit test'
- script: |
set -e
cd ts/nni_manager
yarn test
cd ../nasui
CI=true yarn test
displayName: 'TypeScript unit test'
- job: 'macos'
pool:
vmImage: 'macOS-10.15'
# This platform runs TypeScript unit test first.
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: 3.8
displayName: Configure Python
- script: |
set -e
echo "##vso[task.setvariable variable=PATH]${PATH}:${HOME}/.local/bin"
python -m pip install -U --upgrade pip setuptools wheel
python -m pip install -U pytest coverage
displayName: 'Install Python tools'
- script: |
python3 setup.py develop
displayName: 'Install NNI'
- script: |
set -e
export CI=true
(cd ts/nni_manager && yarn test)
(cd ts/nasui && yarn test)
displayName: 'TypeScript unit test'
- script: |
set -e
# pytorch Mac binary does not support CUDA, default is cpu version
python3 -m pip install -U torchvision==0.6.0 torch==1.5.0
python3 -m pip install -U tensorflow==2.3.1
brew install swig@3
rm -f /usr/local/bin/swig
ln -s /usr/local/opt/swig\@3/bin/swig /usr/local/bin/swig
nnictl package install --name=SMAC
displayName: 'Install extra dependencies'
- script: |
cd test
python3 -m pytest ut
displayName: 'Python unit test'
- script: |
cd test
python3 nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'Simple integration test'
# FIXME: Windows UT is still under debugging
- job: 'windows'
pool:
vmImage: 'windows-2019'
# This platform runs Python unit test first.
steps:
- script: |
python -m pip install -U --upgrade pip setuptools
python -m pip install -U pytest coverage
displayName: 'Install Python tools'
- script: |
python setup.py develop --no-user
displayName: 'Install NNI'
- script: |
python -m pip install -U scikit-learn==0.23.2
python -m pip install -U torch==1.5.0+cpu torchvision==0.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
python -m pip install -U tensorflow==2.3.1
displayName: 'Install extra dependencies'
- script: |
cd test
python -m pytest ut
displayName: 'Python unit test'
- script: |
cd ts/nni_manager
yarn test
displayName: 'TypeScript unit test'
- script: |
cd test
python nni_test/nnitest/run_tests.py --config config/pr_tests.yml
displayName: 'Simple integration test'
trigger:
branches:
exclude: [ l10n_master ]