Skip to content

Commit 507a6aa

Browse files
Add pure keras unit tests for Windows (#1582)
Signed-off-by: Tom Wildenhain <[email protected]>
1 parent 15453f0 commit 507a6aa

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

ci_build/azure_pipelines/keras2onnx_unit_test.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
vmImage: 'vs2017-win2016'
120120
strategy:
121121
matrix:
122-
# No python 2.x since no available ONNX package for Windows
122+
############ TF Keras Unit Tests ############
123123
Python36-onnx1.2:
124124
python.version: '3.6'
125125
ONNX_PATH: onnx==1.2.3
@@ -156,7 +156,27 @@ jobs:
156156
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
157157
INSTALL_ORT: pip install onnxruntime==1.8.0
158158

159-
maxParallel: 3
159+
############ Pure Keras Unit Tests ############
160+
Keras-Py36-tf1.15.0:
161+
python.version: '3.6'
162+
ONNX_PATH: onnx==1.5.0
163+
KERAS: keras==2.2.5
164+
TENSORFLOW_PATH: tensorflow==1.15.0
165+
INSTALL_ORT: pip install onnxruntime==1.8.0
166+
167+
Keras-Py37-tf2.0.0:
168+
python.version: '3.7'
169+
ONNX_PATH: onnx==1.7.0
170+
KERAS: keras==2.3.1
171+
TENSORFLOW_PATH: tensorflow==2.0.0
172+
INSTALL_ORT: pip install onnxruntime==1.8.0
173+
174+
Keras-Py37-tf2.2.0:
175+
python.version: '3.7'
176+
ONNX_PATH: onnx==1.9.0
177+
KERAS: keras==2.4.3
178+
TENSORFLOW_PATH: tensorflow==2.2.0
179+
INSTALL_ORT: pip install onnxruntime==1.8.0
160180

161181
steps:
162182
- task: UsePythonVersion@0
@@ -179,6 +199,7 @@ jobs:
179199
pip install protobuf
180200
pip install h5py==2.9.0
181201
pip install %TENSORFLOW_PATH%
202+
IF NOT "%KERAS%"=="" (pip install %KERAS%)
182203
pip install git+https://github.com/microsoft/onnxconverter-common
183204
pip install pytest pytest-cov pytest-runner
184205
%INSTALL_ORT%
@@ -189,6 +210,7 @@ jobs:
189210
pip install -e .
190211
echo Test onnxruntime installation... && python -c "import onnxruntime"
191212
python -c "import onnxconverter_common"
213+
IF NOT "%KERAS%"=="" (set TF_KERAS=0)
192214
pytest keras2onnx_tests --doctest-modules --junitxml=junit/test-results.xml
193215
displayName: 'pytest'
194216

0 commit comments

Comments
 (0)