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

Pin onnxruntime for build in use of onnx < 1.6 #377

Merged
merged 3 commits into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .azure-pipelines/linux-CI-keras-applications-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ jobs:
python.version: '3.5'
ONNX_PATH: onnx==1.2.3
KERAS: keras==2.1.6
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET:

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
KERAS: keras==2.2.4
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET: pip install keras-resnet

Python37:
python.version: '3.7.3'
ONNX_PATH: onnx==1.6.0
KERAS: keras
INSTALL_ORT: pip install -i https://test.pypi.org/simple/ ort-nightly
INSTALL_KERAS_RESNET: pip install keras-resnet

maxParallel: 3
Python37-official-ort:
python.version: '3.7.3'
ONNX_PATH: onnx==1.6.0
KERAS: keras
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET: pip install keras-resnet

maxParallel: 4

steps:
- script: sudo install -d -m 0777 /home/vsts/.conda/envs
Expand All @@ -58,7 +68,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -i https://test.pypi.org/simple/ ort-nightly
$(INSTALL_ORT)
pip install opencv-python
pip install tqdm
pip install keras-segmentation
Expand Down
4 changes: 4 additions & 0 deletions .azure-pipelines/linux-conda-CI-tf-keras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ jobs:
python.version: '3.5'
ONNX_PATH: onnx==1.2.3
TENSORFLOW_PATH: tensorflow==1.11.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
TENSORFLOW_PATH: tensorflow-cpu
INSTALL_ORT:

maxParallel: 3

Expand All @@ -53,6 +56,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
$(INSTALL_ORT)
displayName: 'Install dependencies'

- script: |
Expand Down
4 changes: 4 additions & 0 deletions .azure-pipelines/linux-conda-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@ jobs:
ONNX_PATH: onnx==1.2.3
KERAS: keras==2.1.6
TENSORFLOW_PATH: tensorflow==1.11.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python36-tf1150:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
KERAS: keras==2.2.5
TENSORFLOW_PATH: tensorflow==1.15.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python37-tf200:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
KERAS: keras
TENSORFLOW_PATH: tensorflow==2.0.0
INSTALL_ORT:

maxParallel: 3

Expand All @@ -57,6 +60,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
$(INSTALL_ORT)
displayName: 'Install dependencies'

- script: |
Expand Down
14 changes: 12 additions & 2 deletions .azure-pipelines/win32-CI-keras-applications-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,31 @@ jobs:
python.version: '3.5'
ONNX_PATH: onnx==1.2.3
KERAS: keras==2.1.6
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET:

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
KERAS: keras==2.2.4
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET: pip install keras-resnet

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
KERAS: keras
INSTALL_ORT: pip install -i https://test.pypi.org/simple/ ort-nightly
INSTALL_KERAS_RESNET: pip install keras-resnet

maxParallel: 3
Python37-official-ort:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
KERAS: keras
INSTALL_ORT: pip install onnxruntime==1.1.1
INSTALL_KERAS_RESNET: pip install keras-resnet

maxParallel: 4

steps:
- task: UsePythonVersion@0
Expand Down Expand Up @@ -61,7 +71,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -i https://test.pypi.org/simple/ ort-nightly
%INSTALL_ORT%
pip install opencv-python
pip install tqdm
pip install keras-segmentation
Expand Down
4 changes: 4 additions & 0 deletions .azure-pipelines/win32-conda-CI-tf-keras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,19 @@ jobs:
python.version: '3.5'
ONNX_PATH: onnx==1.2.3
TENSORFLOW_PATH: tensorflow==1.11.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python36:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
TENSORFLOW_PATH: tensorflow==1.14.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python37:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
TENSORFLOW_PATH: tensorflow-cpu
INSTALL_ORT:

maxParallel: 3

Expand Down Expand Up @@ -56,6 +59,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
%INSTALL_ORT%
displayName: 'Install dependencies'

- script: |
Expand Down
4 changes: 4 additions & 0 deletions .azure-pipelines/win32-conda-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,21 @@ jobs:
ONNX_PATH: onnx==1.2.3
KERAS: keras==2.1.6
TENSORFLOW_PATH: tensorflow==1.11.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python36-tf1140:
python.version: '3.6'
ONNX_PATH: onnx==1.5.0
KERAS: keras==2.2.5
TENSORFLOW_PATH: tensorflow==1.14.0
INSTALL_ORT: pip install onnxruntime==1.1.1

Python37-tf200:
python.version: '3.7'
ONNX_PATH: onnx==1.6.0
KERAS: keras
TENSORFLOW_PATH: tensorflow==2.0.0
INSTALL_ORT:

maxParallel: 3

Expand Down Expand Up @@ -60,6 +63,7 @@ jobs:
cd ..
pip install -r requirements.txt
pip install -r requirements-dev.txt
%INSTALL_ORT%
displayName: 'Install dependencies'

- script: |
Expand Down
7 changes: 6 additions & 1 deletion applications/nightly_build/test_mask_rcnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
working_path = os.path.abspath(os.path.dirname(__file__))
tmp_path = os.path.join(working_path, 'temp')

enable_mask_rcnn_test = False

import onnxruntime
if StrictVersion(onnxruntime.__version__.split('-')[0]) == StrictVersion('1.1.1'):
enable_mask_rcnn_test = True

# mask rcnn code From https://github.com/matterport/Mask_RCNN
class TestMaskRCNN(unittest.TestCase):
Expand All @@ -40,7 +45,7 @@ def tearDown(self):
for fl in self.model_files:
os.remove(fl)

@unittest.skipIf(StrictVersion(onnx.__version__.split('-')[0]) < StrictVersion("1.6.0"),
@unittest.skipIf(StrictVersion(onnx.__version__.split('-')[0]) < StrictVersion("1.6.0") or not enable_mask_rcnn_test,
"Mask-rcnn conversion needs contrib op for onnx < 1.6.0.")
def test_mask_rcnn(self):
set_converter('CropAndResize', convert_tf_crop_and_resize)
Expand Down