Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Update test for onnxruntime 1.7.0 (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiafatom authored Mar 3, 2021
1 parent 4edf53c commit fdfe252
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines/linux-conda-CI-tf-keras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
INSTALL_ORT: pip install onnxruntime==1.6.0
INSTALL_ORT: pip install onnxruntime==1.7.0

maxParallel: 3

Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/win32-CI-keras-applications-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
INSTALL_KERAS:
UNINSTALL_KERAS: pip uninstall keras -y
INSTALL_TENSORFLOW: pip install tensorflow==2.2.0
INSTALL_ORT: pip install onnxruntime==1.6.0
INSTALL_ORT: pip install onnxruntime==1.7.0
INSTALL_KERAS_RESNET: pip install keras-resnet
INSTALL_TRANSFORMERS: pip install transformers==3.4.0
NIGHTLY_BUILD_TEST: python run_all_v2.py
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/win32-conda-CI-tf-keras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
python.version: '3.8'
ONNX_PATH: onnx==1.8.0
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
INSTALL_ORT: pip install onnxruntime==1.6.0
INSTALL_ORT: pip install onnxruntime==1.7.0

maxParallel: 3

Expand Down
6 changes: 4 additions & 2 deletions applications/nightly_build/test_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import sys
import unittest
import keras_segmentation
import onnxruntime
from os.path import dirname, abspath
from keras2onnx.proto import keras, is_keras_older_than
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
from distutils.version import StrictVersion

sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../tests/'))
from test_utils import run_image
Expand Down Expand Up @@ -124,8 +126,8 @@ def test_unet_2(self):
res = run_image(model, self.model_files, img_path, color_mode="grayscale", target_size=(img_rows, img_cols))
self.assertTrue(*res)

@unittest.skipIf(get_maximum_opset_supported() < 14,
"Need ConvTranspose-14 support.")
@unittest.skipIf(StrictVersion(onnxruntime.__version__.split('-')[0]) < StrictVersion('1.7.0'),
"ConvTranspose stride > 1 is fixed in onnxruntime 1.7.0.")
def test_unet_3(self):
# From https://github.com/yu4u/noise2noise/blob/master/model.py
model = get_unet_model(out_ch=3, upconv=False)
Expand Down
6 changes: 4 additions & 2 deletions applications/nightly_build/test_unet_plus_plus.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
import sys
import unittest
import numpy as np
import onnxruntime
from os.path import dirname, abspath
from keras2onnx.proto import keras, is_keras_older_than
from keras.applications.vgg16 import VGG16
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
from distutils.version import StrictVersion

sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../tests/'))
from test_utils import run_image
Expand Down Expand Up @@ -100,8 +102,8 @@ def tearDown(self):
for fl in self.model_files:
os.remove(fl)

@unittest.skipIf(get_maximum_opset_supported() < 14,
"Need ConvTranspose-14 support.")
@unittest.skipIf(StrictVersion(onnxruntime.__version__.split('-')[0]) < StrictVersion('1.7.0'),
"ConvTranspose stride > 1 is fixed in onnxruntime 1.7.0.")
def test_unet_plus_plus(self):
backbone_name = 'vgg16'
input_shape = (None, None, 3)
Expand Down

0 comments on commit fdfe252

Please sign in to comment.