Skip to content

Commit 847f2dc

Browse files
authored
Update CI with onnxruntime==1.14.0 (#967)
* update CI Signed-off-by: xadupre <[email protected]> * fix unit test Signed-off-by: xadupre <[email protected]> * remove unnecessary print Signed-off-by: xadupre <[email protected]> * fix normalizer Signed-off-by: xadupre <[email protected]> --------- Signed-off-by: xadupre <[email protected]>
1 parent bbe2f6d commit 847f2dc

File tree

5 files changed

+50
-13
lines changed

5 files changed

+50
-13
lines changed

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

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,41 @@ jobs:
1414
strategy:
1515
matrix:
1616

17-
Py310-Onnx130-Rt131-Skl12:
17+
Py310-Onnx130-Rt140-Skl121:
18+
do.bench: '0'
19+
python.version: '3.10'
20+
numpy.version: '>=1.21.1'
21+
scipy.version: '>=1.7.0'
22+
onnx.version: 'onnx==1.13.0' #'-i https://test.pypi.org/simple/ onnx==1.13.0rc1'
23+
onnx.target_opset: ''
24+
onnxrt.version: 'onnxruntime==1.14.0' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
25+
sklearn.version: '>=1.2.1'
26+
lgbm.version: ''
27+
onnxcc.version: '>=1.8.1' # git
28+
run.example: '1'
29+
30+
Py310-Onnx130-Rt131-Skl120:
1831
do.bench: '0'
1932
python.version: '3.10'
2033
numpy.version: '>=1.21.0'
2134
scipy.version: '>=1.7.0'
2235
onnx.version: 'onnx==1.13.0' #'-i https://test.pypi.org/simple/ onnx==1.13.0rc1'
2336
onnx.target_opset: ''
2437
onnxrt.version: 'onnxruntime==1.13.1' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
25-
sklearn.version: '>=1.2'
38+
sklearn.version: '==1.2.0'
2639
lgbm.version: ''
2740
onnxcc.version: '>=1.8.1' # git
28-
run.example: '1'
41+
run.example: '0'
2942

30-
Py310-Onnx120-Rt131-Skl12:
43+
Py310-Onnx120-Rt131-Skl120:
3144
do.bench: '0'
3245
python.version: '3.10'
3346
numpy.version: '>=1.21.0'
3447
scipy.version: '>=1.7.0'
3548
onnx.version: 'onnx==1.12.0' #'-i https://test.pypi.org/simple/ onnx==1.12.0rc4'
3649
onnx.target_opset: ''
3750
onnxrt.version: 'onnxruntime==1.13.1' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
38-
sklearn.version: '>=1.2'
51+
sklearn.version: '==1.2.0'
3952
lgbm.version: ''
4053
onnxcc.version: '>=1.8.1' # git
4154
run.example: '1'

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

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,33 @@ jobs:
1313
vmImage: 'windows-latest'
1414
strategy:
1515
matrix:
16-
Py310-Onnx130-Rt131-Skl12:
16+
Py310-Onnx130-Rt140-Skl121:
17+
python.version: '3.10'
18+
onnx.version: 'onnx==1.13.0' #'-i https://test.pypi.org/simple/ onnx==1.12.0rc4'
19+
onnx.target_opset: ''
20+
numpy.version: 'numpy>=1.22.3'
21+
scipy.version: 'scipy'
22+
onnxrt.version: 'onnxruntime==1.14.0' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
23+
onnxcc.version: 'onnxconverter-common>=1.8.1' # git+https://github.com/microsoft/onnxconverter-common.git
24+
sklearn.version: '>=1.2.1'
25+
Py310-Onnx130-Rt131-Skl120:
1726
python.version: '3.10'
1827
onnx.version: 'onnx==1.13.0' #'-i https://test.pypi.org/simple/ onnx==1.12.0rc4'
1928
onnx.target_opset: ''
2029
numpy.version: 'numpy>=1.22.3'
2130
scipy.version: 'scipy'
2231
onnxrt.version: 'onnxruntime==1.13.1' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
2332
onnxcc.version: 'onnxconverter-common>=1.8.1' # git+https://github.com/microsoft/onnxconverter-common.git
24-
sklearn.version: '>=1.2'
25-
Py310-Onnx120-Rt131-Skl12:
33+
sklearn.version: '==1.2.0'
34+
Py310-Onnx120-Rt131-Skl120:
2635
python.version: '3.10'
2736
onnx.version: 'onnx==1.12.0' #'-i https://test.pypi.org/simple/ onnx==1.12.0rc4'
2837
onnx.target_opset: ''
2938
numpy.version: 'numpy>=1.22.3'
3039
scipy.version: 'scipy'
3140
onnxrt.version: 'onnxruntime==1.13.1' # -i https://test.pypi.org/simple/ ort-nightly==1.11.0.dev20220311003
3241
onnxcc.version: 'onnxconverter-common>=1.8.1' # git+https://github.com/microsoft/onnxconverter-common.git
33-
sklearn.version: '>=1.2'
42+
sklearn.version: '==1.2.0'
3443
Py310-Onnx120-Rt120-Skl11:
3544
python.version: '3.10'
3645
onnx.version: 'onnx==1.12.0' #'-i https://test.pypi.org/simple/ onnx==1.12.0rc4'

skl2onnx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44
Main entry point to the converter from the *scikit-learn* to *onnx*.
55
"""
6-
__version__ = "1.13.1"
6+
__version__ = "1.14.0"
77
__author__ = "Microsoft"
88
__producer__ = "skl2onnx"
99
__producer_version__ = __version__

skl2onnx/algebra/onnx_ops.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,16 @@ def OnnxSplitApi18(*x, axis=0, split=None, num_outputs=None,
363363
"split or num_outputs or output_names "
364364
"must be specified since opset 18.")
365365
num_outputs = len(output_names)
366+
if num_outputs is None:
367+
raise AttributeError(
368+
"num_outputs cannot be None for Split-18.")
366369
return OnnxSplit_18( # noqa
367370
*x, axis=axis, op_version=op_version,
368371
num_outputs=num_outputs, output_names=output_names)
372+
if num_outputs is None:
373+
return OnnxSplit_18( # noqa
374+
*x, np.array(split, dtype=np.int64), axis=axis,
375+
op_version=op_version, output_names=output_names)
369376
return OnnxSplit_18( # noqa
370377
*x, np.array(split, dtype=np.int64), axis=axis,
371378
num_outputs=num_outputs, op_version=op_version,

skl2onnx/common/_apply_operation.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,17 @@ def apply_normalizer(scope, inputs, outputs, container,
5656
elif norm == 'L2':
5757
norm = scope.get_unique_variable_name('norm')
5858
norm2 = scope.get_unique_variable_name('norm2')
59-
container.add_node(
60-
'ReduceSumSquare', input, norm, axes=[1], keepdims=1,
61-
name=scope.get_unique_operator_name('ReduceSumSquare'))
59+
if container.target_opset < 18:
60+
container.add_node(
61+
'ReduceSumSquare', input, norm, axes=[1], keepdims=1,
62+
name=scope.get_unique_operator_name('ReduceSumSquare'))
63+
else:
64+
axis_name = scope.get_unique_variable_name('axis')
65+
container.add_initializer(
66+
axis_name, onnx_proto.TensorProto.INT64, [1], [1])
67+
container.add_node(
68+
'ReduceSumSquare', [input, axis_name], norm, keepdims=1,
69+
name=scope.get_unique_operator_name('ReduceSumSquare'))
6270
container.add_node(
6371
'Sqrt', [norm], norm2,
6472
name=scope.get_unique_operator_name('Sqrt'))

0 commit comments

Comments
 (0)