Skip to content

Commit a1588df

Browse files
authored
Support for opset 15 and update version to 1.10.0 (#505)
* Support for opset 15 * add target_opset to all unit tests
1 parent f089575 commit a1588df

File tree

71 files changed

+545
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+545
-203
lines changed

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

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
vmImage: 'ubuntu-latest'
1515
strategy:
1616
matrix:
17-
Python39-1101-RT181-xgb11:
17+
Python39-1101-RT190:
1818
python.version: '3.9'
1919
ONNX_PATH: onnx==1.10.1 # '-i https://test.pypi.org/simple/ onnx==1.9.101'
20-
ONNXRT_PATH: onnxruntime==1.8.1
20+
ONNXRT_PATH: onnxruntime==1.9.0
2121
COREML_PATH: git+https://github.com/apple/[email protected]
2222
xgboost.version: '>=1.2'
2323
Python39-190-RT180-xgb11:
@@ -105,8 +105,9 @@ jobs:
105105
106106
- script: |
107107
export PYTHONPATH=.
108-
python -c "import onnxconverter_common;print(onnxconverter_common.__version__)"
109-
python -c "import onnxruntime;print(onnxruntime.__version__)"
108+
python -c "import onnxruntime;print('onnx:',onnx.__version__)"
109+
python -c "import onnxconverter_common;print('cc:',onnxconverter_common.__version__)"
110+
python -c "import onnxruntime;print('ort:',onnxruntime.__version__)"
110111
displayName: 'version'
111112
112113
- script: |
@@ -119,11 +120,6 @@ jobs:
119120
pytest tests/catboost --durations=0
120121
displayName: 'pytest - catboost'
121122
122-
- script: |
123-
export PYTHONPATH=.
124-
pytest tests/coreml --durations=0
125-
displayName: 'pytest - coreml'
126-
127123
- script: |
128124
export PYTHONPATH=.
129125
pytest tests/lightgbm --durations=0
@@ -165,6 +161,11 @@ jobs:
165161
pytest tests/hummingbirdml --durations=0
166162
displayName: 'pytest - hummingbirdml'
167163
164+
- script: |
165+
export PYTHONPATH=.
166+
pytest tests/coreml --durations=0
167+
displayName: 'pytest - coreml'
168+
168169
- task: PublishTestResults@2
169170
inputs:
170171
testResultsFiles: '**/test-results.xml'

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
vmImage: 'windows-latest'
1515
strategy:
1616
matrix:
17-
Python39-1101-RT181:
17+
Python39-1101-RT190:
1818
python.version: '3.9'
1919
ONNX_PATH: 'onnx==1.10.1' # '-i https://test.pypi.org/simple/ onnx==1.9.101'
20-
ONNXRT_PATH: onnxruntime==1.8.1
20+
ONNXRT_PATH: onnxruntime==1.9.0
2121
COREML_PATH: git+https://github.com/apple/[email protected]
2222

2323
Python39-190-RT181:

onnxmltools/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
This framework converts any machine learned model into onnx format
66
which is a common language to describe any machine learned model.
77
"""
8-
__version__ = "1.9.1"
8+
__version__ = "1.10.0"
99
__author__ = "Microsoft"
1010
__producer__ = "OnnxMLTools"
1111
__producer_version__ = __version__
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
from onnx.defs import onnx_opset_version
4+
from onnxconverter_common.onnx_ex import (
5+
get_maximum_opset_supported as _get_maximum_opset_supported)
6+
7+
8+
def get_maximum_opset_supported():
9+
return min(onnx_opset_version(),
10+
max(15, _get_maximum_opset_supported()))

onnxmltools/convert/coreml/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import coremltools
44
from uuid import uuid4
5-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
65
import onnx
76
from ...proto import onnx_proto
87
from ..common._topology import convert_topology
8+
from ..common.onnx_ex import get_maximum_opset_supported
99
from ._parse import parse_coreml
1010

1111
# Import modules to invoke function registrations

onnxmltools/convert/h2o/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import tempfile
66
import h2o
77

8-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
98
import onnx
9+
from ..common.onnx_ex import get_maximum_opset_supported
1010
from ..common._topology import convert_topology
1111
from ..common.data_types import FloatTensorType
1212
from ._parse import parse_h2o

onnxmltools/convert/libsvm/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: Apache-2.0
22

33
from uuid import uuid4
4-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
54
import onnx
5+
from ..common.onnx_ex import get_maximum_opset_supported
66
from ..common._topology import convert_topology
77
from ._parse import parse_libsvm
88

onnxmltools/convert/lightgbm/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from uuid import uuid4
44
import onnx
55
import lightgbm
6-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
6+
from ..common.onnx_ex import get_maximum_opset_supported
77
from ..common._topology import convert_topology
88
from ..common.utils import hummingbird_installed
99
from ._parse import parse_lightgbm, WrappedBooster

onnxmltools/convert/sparkml/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from uuid import uuid4
44
import onnx
5-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
5+
from ..common.onnx_ex import get_maximum_opset_supported
66
from ..common._topology import convert_topology
77
from ._parse import parse_sparkml
88
from . import operator_converters

onnxmltools/convert/xgboost/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from uuid import uuid4
44
import xgboost
5-
from onnxconverter_common.onnx_ex import get_maximum_opset_supported
65
import onnx
6+
from ..common.onnx_ex import get_maximum_opset_supported
77
from ..common._topology import convert_topology
88
from ._parse import parse_xgboost, WrappedBooster
99

0 commit comments

Comments
 (0)