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

Commit fdfe252

Browse files
authored
Update test for onnxruntime 1.7.0 (#692)
1 parent 4edf53c commit fdfe252

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.azure-pipelines/linux-conda-CI-tf-keras.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
python.version: '3.8'
4343
ONNX_PATH: onnx==1.8.0
4444
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
45-
INSTALL_ORT: pip install onnxruntime==1.6.0
45+
INSTALL_ORT: pip install onnxruntime==1.7.0
4646

4747
maxParallel: 3
4848

.azure-pipelines/win32-CI-keras-applications-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
INSTALL_KERAS:
6666
UNINSTALL_KERAS: pip uninstall keras -y
6767
INSTALL_TENSORFLOW: pip install tensorflow==2.2.0
68-
INSTALL_ORT: pip install onnxruntime==1.6.0
68+
INSTALL_ORT: pip install onnxruntime==1.7.0
6969
INSTALL_KERAS_RESNET: pip install keras-resnet
7070
INSTALL_TRANSFORMERS: pip install transformers==3.4.0
7171
NIGHTLY_BUILD_TEST: python run_all_v2.py

.azure-pipelines/win32-conda-CI-tf-keras.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
python.version: '3.8'
4343
ONNX_PATH: onnx==1.8.0
4444
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
45-
INSTALL_ORT: pip install onnxruntime==1.6.0
45+
INSTALL_ORT: pip install onnxruntime==1.7.0
4646

4747
maxParallel: 3
4848

applications/nightly_build/test_unet.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
import sys
55
import unittest
66
import keras_segmentation
7+
import onnxruntime
78
from os.path import dirname, abspath
89
from keras2onnx.proto import keras, is_keras_older_than
910
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
11+
from distutils.version import StrictVersion
1012

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

127-
@unittest.skipIf(get_maximum_opset_supported() < 14,
128-
"Need ConvTranspose-14 support.")
129+
@unittest.skipIf(StrictVersion(onnxruntime.__version__.split('-')[0]) < StrictVersion('1.7.0'),
130+
"ConvTranspose stride > 1 is fixed in onnxruntime 1.7.0.")
129131
def test_unet_3(self):
130132
# From https://github.com/yu4u/noise2noise/blob/master/model.py
131133
model = get_unet_model(out_ch=3, upconv=False)

applications/nightly_build/test_unet_plus_plus.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import sys
55
import unittest
66
import numpy as np
7+
import onnxruntime
78
from os.path import dirname, abspath
89
from keras2onnx.proto import keras, is_keras_older_than
910
from keras.applications.vgg16 import VGG16
1011
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
12+
from distutils.version import StrictVersion
1113

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

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

0 commit comments

Comments
 (0)