Skip to content

Commit

Permalink
Update nightly build (#227)
Browse files Browse the repository at this point in the history
* Update nightly build
* Update test_algebra_meta_onnx.py
  • Loading branch information
xadupre committed Jul 30, 2019
1 parent 33abc90 commit a889074
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/linux-CI-nightly.yml
Expand Up @@ -18,7 +18,7 @@ jobs:
numpy.version: '==1.16.3'
onnx.version: '==1.5.0'
onnxrt.version: '-i https://test.pypi.org/simple/ ort-nightly'
sklearn.version: '==0.20.3'
sklearn.version: '==0.21.3'
maxParallel: 3

steps:
Expand Down
8 changes: 7 additions & 1 deletion .azure-pipelines/win32-CI-nightly.yml
Expand Up @@ -13,12 +13,13 @@ jobs:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Py37-Onnx150-nightlyRT-Npy1154:
Py37-Onnx150-nightlyRT-Npy1163:
python.version: '3.7'
onnx.version: 'onnx==1.5.0'
numpy.version: 'numpy==1.16.3'
scipy.version: 'scipy'
onnxrt.version: '-i https://test.pypi.org/simple/ ort-nightly'
sklearn.version: '==0.21.3'
maxParallel: 3

steps:
Expand Down Expand Up @@ -57,6 +58,10 @@ jobs:
pip install $(onnxrt.version)
displayName: 'install onnxruntime'
- script: |
pip install scikit-learn$(sklearn.version)
displayName: 'install scikit-learn'
- script: |
call activate py$(python.version)
pip install -e .
Expand All @@ -66,6 +71,7 @@ jobs:
call activate py$(python.version)
python -c "import numpy;print('numpy:',numpy.__version__)"
python -c "import scipy;print('scipy:',scipy.__version__)"
python -c "import sklearn;print('sklearn:',sklearn.__version__)"
python -c "import onnx;print('onnx:',onnx.__version__)"
python -c "import onnxconverter_common;print('onnxconverter-common:',onnxconverter_common.__version__)"
python -c "import onnxruntime;print('onnxruntime:',onnxruntime.__version__)"
Expand Down
1 change: 1 addition & 0 deletions tests/test_algebra_meta_onnx.py
Expand Up @@ -44,6 +44,7 @@ def test_onnx_spec(self):
'ConvInteger',
'ConvTranspose',
'CumSum', # opset 11
'DepthToSpace', # opset 11
'DequantizeLinear',
'Equal', # opset 11
'Expand', # shape inference fails
Expand Down
12 changes: 11 additions & 1 deletion tests/test_algebra_onnx_operators_scan.py
@@ -1,10 +1,13 @@
import sys
import unittest
import warnings
from distutils.version import StrictVersion
from collections import OrderedDict
import numpy as np
from numpy.testing import assert_almost_equal
from scipy.spatial.distance import pdist, squareform, cdist as scipy_cdist
import onnx
from onnx.onnx_cpp2py_export.checker import ValidationError
from onnxruntime import InferenceSession, __version__ as ort_version
from skl2onnx.common.data_types import FloatTensorType
from skl2onnx.algebra.onnx_ops import (
Expand Down Expand Up @@ -152,7 +155,14 @@ def test_onnx_example_pdist(self):
model_def = node.to_onnx({'x': x},
outputs=[('y', FloatTensorType([3, 2])),
('z', FloatTensorType([3, 3]))])
onnx.checker.check_model(model_def)
try:
onnx.checker.check_model(model_def)
except ValidationError as e:
if sys.platform.startswith("win"):
# schema information in onnx is incomplete on Windows
warnings.warn(e)
else:
raise e

sess = InferenceSession(model_def.SerializeToString())
res = sess.run(None, {'x': x})
Expand Down

0 comments on commit a889074

Please sign in to comment.