Skip to content

Commit 5770433

Browse files
authored
add opset-15 (#1731)
* add opset-15 Signed-off-by: Guenther Schmuelling <[email protected]> * add opset-15 to ut Signed-off-by: Guenther Schmuelling <[email protected]> * remove opset-8 from ci Signed-off-by: Guenther Schmuelling <[email protected]> * adjust onnx version for keras ut Signed-off-by: Guenther Schmuelling <[email protected]> * more version adjustments for keras ut Signed-off-by: Guenther Schmuelling <[email protected]>
1 parent a1facc5 commit 5770433

File tree

6 files changed

+58
-62
lines changed

6 files changed

+58
-62
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr
1717

1818
| Build Type | OS | Python | Tensorflow | ONNX opset | Status |
1919
| --- | --- | --- | --- | --- | --- |
20-
| Unit Test - Basic | Linux, MacOS<sup>\*</sup>, Windows<sup>\*</sup> | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 8-14 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=master) |
21-
| Unit Test - Full | Linux, MacOS, Windows | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 8-14 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=master) | |
20+
| Unit Test - Basic | Linux, MacOS<sup>\*</sup>, Windows<sup>\*</sup> | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 9-15 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=master) |
21+
| Unit Test - Full | Linux, MacOS, Windows | 3.6-3.9 | 1.12-1.15, 2.1-2.6 | 9-15 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=master)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=master) | |
2222
<br/>
2323

2424
## Supported Versions
@@ -27,7 +27,7 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr
2727

2828
tf2onnx will use the ONNX version installed on your system and installs the latest ONNX version if none is found.
2929

30-
We support and test ONNX opset-8 to opset-14. opset-6 and opset-7 should work but we don't test them.
30+
We support and test ONNX opset-9 to opset-15. opset-6 to opset-8 should work but we don't test them.
3131
By default we use ```opset-9``` for the resulting ONNX graph since most runtimes will support opset-9.
3232

3333
If you want the graph to be generated with a specific opset, use ```--opset``` in the command line, for example ```--opset 13```.

ci_build/azure_pipelines/keras2onnx_unit_test.yml

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,63 +11,63 @@ jobs:
1111
############ TF Keras Unit Tests ############
1212
Python36-tf1.15:
1313
python.version: '3.6'
14-
ONNX_PATH: onnx==1.5.0
14+
ONNX_PATH: onnx==1.10.1
1515
TENSORFLOW_PATH: tensorflow==1.15.0
16-
INSTALL_ORT: pip install onnxruntime==1.8.0
16+
INSTALL_ORT: pip install onnxruntime==1.9.0
1717

1818
Python37-tf2.1:
1919
python.version: '3.7'
20-
ONNX_PATH: onnx==1.6.0
20+
ONNX_PATH: onnx==1.10.1
2121
TENSORFLOW_PATH: tensorflow-cpu==2.1.0
22-
INSTALL_ORT: pip install onnxruntime==1.8.0
22+
INSTALL_ORT: pip install onnxruntime==1.9.0
2323

2424
Python38-tf2.2:
2525
python.version: '3.8'
26-
ONNX_PATH: onnx==1.7.0
26+
ONNX_PATH: onnx==1.10.1
2727
TENSORFLOW_PATH: tensorflow-cpu==2.2.0
28-
INSTALL_ORT: pip install onnxruntime==1.8.0
28+
INSTALL_ORT: pip install onnxruntime==1.9.0
2929

3030
Python38-tf2.3:
3131
python.version: '3.8'
32-
ONNX_PATH: onnx==1.8.0
32+
ONNX_PATH: onnx==1.10.1
3333
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
34-
INSTALL_ORT: pip install onnxruntime==1.8.0
34+
INSTALL_ORT: pip install onnxruntime==1.9.0
3535

3636
Python38-tf2.5:
3737
python.version: '3.8'
38-
ONNX_PATH: onnx==1.8.0
38+
ONNX_PATH: onnx==1.10.1
3939
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
40-
INSTALL_ORT: pip install onnxruntime==1.8.0
40+
INSTALL_ORT: pip install onnxruntime==1.9.0
4141

4242
############ Pure Keras Unit Tests ############
4343
Keras-Py36-tf1.15.0:
4444
python.version: '3.6'
45-
ONNX_PATH: onnx==1.5.0
45+
ONNX_PATH: onnx==1.10.1
4646
KERAS: keras==2.2.5
4747
TENSORFLOW_PATH: tensorflow==1.15.0
48-
INSTALL_ORT: pip install onnxruntime==1.8.0
48+
INSTALL_ORT: pip install onnxruntime==1.9.0
4949

5050
Keras-Py37-tf1.15.0:
5151
python.version: '3.7'
52-
ONNX_PATH: onnx==1.9.0
52+
ONNX_PATH: onnx==1.10.1
5353
KERAS: keras==2.4.3
5454
TENSORFLOW_PATH: tensorflow==1.15.0
55-
INSTALL_ORT: pip install onnxruntime==1.8.0
55+
INSTALL_ORT: pip install onnxruntime==1.9.0
5656

5757
# UT for keras 2.3 need tensorflow <= 2.0.0
5858
Keras-Py37-tf2.0.0:
5959
python.version: '3.7'
60-
ONNX_PATH: onnx==1.6.0
60+
ONNX_PATH: onnx==1.10.1
6161
KERAS: keras==2.3.1
6262
TENSORFLOW_PATH: tensorflow==2.0.0
63-
INSTALL_ORT: pip install onnxruntime==1.8.0
63+
INSTALL_ORT: pip install onnxruntime==1.9.0
6464

6565
Keras-Py38-tf2.2.0:
6666
python.version: '3.8'
67-
ONNX_PATH: onnx==1.7.0
67+
ONNX_PATH: onnx==1.10.1
6868
KERAS: keras==2.4.3
6969
TENSORFLOW_PATH: tensorflow==2.2.0
70-
INSTALL_ORT: pip install onnxruntime==1.8.0
70+
INSTALL_ORT: pip install onnxruntime==1.9.0
7171

7272
steps:
7373
- template: 'templates/keras2onnx_unit_test.yml'
@@ -80,63 +80,57 @@ jobs:
8080
strategy:
8181
matrix:
8282
############ TF Keras Unit Tests ############
83-
Python36-onnx1.2:
83+
Python36-tf-1.15:
8484
python.version: '3.6'
85-
ONNX_PATH: onnx==1.2.3
85+
ONNX_PATH: onnx==1.10.1
8686
TENSORFLOW_PATH: tensorflow==1.15.0
87-
INSTALL_ORT: pip install onnxruntime==1.8.0
88-
89-
Python36-onnx1.5:
90-
python.version: '3.6'
91-
ONNX_PATH: onnx==1.5.0
92-
TENSORFLOW_PATH: tensorflow==1.15.0
93-
INSTALL_ORT: pip install onnxruntime==1.8.0
87+
INSTALL_ORT: pip install onnxruntime==1.9.0
9488

9589
Python37-tf2.1:
9690
python.version: '3.7'
97-
ONNX_PATH: onnx==1.6.0
91+
ONNX_PATH: onnx==1.10.1
9892
TENSORFLOW_PATH: tensorflow-cpu==2.1.0
99-
INSTALL_ORT: pip install onnxruntime==1.8.0
93+
INSTALL_ORT: pip install onnxruntime==1.9.0
10094

10195
Python37-tf2.2:
10296
python.version: '3.7'
103-
ONNX_PATH: onnx==1.7.0
97+
ONNX_PATH: onnx==1.10.1
10498
TENSORFLOW_PATH: tensorflow-cpu==2.2.0
105-
INSTALL_ORT: pip install onnxruntime==1.8.0
99+
INSTALL_ORT: pip install onnxruntime==1.9.0
106100

107101
Python37-tf2.3:
108102
python.version: '3.7'
109-
ONNX_PATH: onnx==1.9.0
103+
ONNX_PATH: onnx==1.10.1
110104
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
111-
INSTALL_ORT: pip install onnxruntime==1.8.0
105+
INSTALL_ORT: pip install onnxruntime==1.9.0
112106

113107
Python37-tf2.5:
114108
python.version: '3.7'
115-
ONNX_PATH: onnx==1.9.0
109+
ONNX_PATH: onnx==1.10.1
116110
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
117-
INSTALL_ORT: pip install onnxruntime==1.8.0
111+
INSTALL_ORT: pip install onnxruntime==1.9.0
118112

119113
############ Pure Keras Unit Tests ############
120114
Keras-Py36-tf1.15.0:
121115
python.version: '3.6'
122-
ONNX_PATH: onnx==1.5.0
116+
ONNX_PATH: onnx==1.10.1
123117
KERAS: keras==2.2.5
124118
TENSORFLOW_PATH: tensorflow==1.15.0
125-
INSTALL_ORT: pip install onnxruntime==1.8.0
119+
INSTALL_ORT: pip install onnxruntime==1.9.0
126120

127121
Keras-Py37-tf2.0.0:
128122
python.version: '3.7'
129-
ONNX_PATH: onnx==1.7.0
123+
ONNX_PATH: onnx==1.10.1
130124
KERAS: keras==2.3.1
131125
TENSORFLOW_PATH: tensorflow==2.0.0
132-
INSTALL_ORT: pip install onnxruntime==1.8.0
126+
INSTALL_ORT: pip install onnxruntime==1.9.0
133127

134128
Keras-Py37-tf2.2.0:
135129
python.version: '3.7'
136-
ONNX_PATH: onnx==1.9.0
130+
ONNX_PATH: onnx==1.10.1
137131
KERAS: keras==2.4.3
138132
TENSORFLOW_PATH: tensorflow==2.2.0
139-
INSTALL_ORT: pip install onnxruntime==1.8.0
133+
INSTALL_ORT: pip install onnxruntime==1.9.0
140134

141135
steps:
142136
- template: 'templates/keras2onnx_unit_test.yml'

ci_build/azure_pipelines/templates/job_generator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ parameters:
55
python_versions: ['3.7']
66
tf_versions: ['']
77
onnx_versions: ['']
8-
onnx_opsets: ['14', '13', '12', '11', '10', '9', '8']
9-
onnx_backends: {onnxruntime: ['1.8.0']}
8+
onnx_opsets: ['15', '14', '13', '12', '11', '10', '9']
9+
onnx_backends: {onnxruntime: ['1.9.0']}
1010
job: {}
1111
run_setup: 'True'
1212
report_coverage: 'False'

ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,31 @@ jobs:
1111
############ TF Keras Unit Tests ############
1212
Python36-tf1.15:
1313
python.version: '3.6'
14-
ONNX_PATH: onnx==1.5.0
14+
ONNX_PATH: onnx==1.10.1
1515
TENSORFLOW_PATH: tensorflow==1.15.0
16-
INSTALL_ORT: pip install onnxruntime==1.8.0
16+
INSTALL_ORT: pip install onnxruntime==1.9.0
1717

1818
Python38-tf2.5:
1919
python.version: '3.8'
20-
ONNX_PATH: onnx==1.8.0
20+
ONNX_PATH: onnx==1.10.1
2121
TENSORFLOW_PATH: tensorflow-cpu==2.5.0
22-
INSTALL_ORT: pip install onnxruntime==1.8.0
22+
INSTALL_ORT: pip install onnxruntime==1.9.0
2323

2424
############ Pure Keras Unit Tests ############
2525
Keras-Py37-tf1.15.0:
2626
python.version: '3.7'
27-
ONNX_PATH: onnx==1.9.0
27+
ONNX_PATH: onnx==1.10.1
2828
KERAS: keras==2.4.3
2929
TENSORFLOW_PATH: tensorflow==1.15.0
30-
INSTALL_ORT: pip install onnxruntime==1.8.0
30+
INSTALL_ORT: pip install onnxruntime==1.9.0
3131

3232
# UT for keras 2.3 need tensorflow <= 2.0.0
3333
Keras-Py37-tf2.0.0:
3434
python.version: '3.7'
35-
ONNX_PATH: onnx==1.6.0
35+
ONNX_PATH: onnx==1.10.1
3636
KERAS: keras==2.3.1
3737
TENSORFLOW_PATH: tensorflow==2.0.0
38-
INSTALL_ORT: pip install onnxruntime==1.8.0
38+
INSTALL_ORT: pip install onnxruntime==1.9.0
3939

4040
steps:
4141
- template: 'templates/keras2onnx_unit_test.yml'
@@ -48,25 +48,25 @@ jobs:
4848
strategy:
4949
matrix:
5050
############ TF Keras Unit Tests ############
51-
Python36-onnx1.2:
51+
Python36-tf-1.15:
5252
python.version: '3.6'
53-
ONNX_PATH: onnx==1.2.3
53+
ONNX_PATH: onnx==1.10.1
5454
TENSORFLOW_PATH: tensorflow==1.15.0
55-
INSTALL_ORT: pip install onnxruntime==1.8.0
55+
INSTALL_ORT: pip install onnxruntime==1.9.0
5656

5757
Python37-tf2.3:
5858
python.version: '3.7'
59-
ONNX_PATH: onnx==1.9.0
59+
ONNX_PATH: onnx==1.10.1
6060
TENSORFLOW_PATH: tensorflow-cpu==2.3.0
61-
INSTALL_ORT: pip install onnxruntime==1.8.0
61+
INSTALL_ORT: pip install onnxruntime==1.9.0
6262

6363
############ Pure Keras Unit Tests ############
6464
Keras-Py37-tf2.2.0:
6565
python.version: '3.7'
66-
ONNX_PATH: onnx==1.9.0
66+
ONNX_PATH: onnx==1.10.1
6767
KERAS: keras==2.4.3
6868
TENSORFLOW_PATH: tensorflow==2.2.0
69-
INSTALL_ORT: pip install onnxruntime==1.8.0
69+
INSTALL_ORT: pip install onnxruntime==1.9.0
7070

7171
steps:
7272
- template: 'templates/keras2onnx_unit_test.yml'

tests/run_pretrained_models.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ ssd_mobilenet_v3_large_coco:
326326
opset_constraints:
327327
"onnx":
328328
"min": 10
329+
"max": 14 # FIXME, temorary until onnx-1.10.2 is out
329330
input_get: get_beach
330331
inputs:
331332
"normalized_input_image_tensor:0": [1, 320, 320, 3]
@@ -420,6 +421,7 @@ faster_rcnn_inception_v2_coco:
420421
opset_constraints:
421422
"onnx":
422423
"min": 11
424+
"max": 14 # FIXME: temporary until onnx-1.10.2 is out
423425
input_get: get_beach
424426
inputs:
425427
"image_tensor:0": [1, 224, 224, 3]

tf2onnx/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
# Mapping opset to IR version.
4949
# Note: opset 7 and opset 8 came out with IR3 but we need IR4 because of PlaceholderWithDefault
5050
OPSET_TO_IR_VERSION = {
51-
1: 3, 2: 3, 3: 3, 4: 3, 5: 3, 6: 3, 7: 4, 8: 4, 9: 4, 10: 5, 11: 6, 12: 7, 13: 7, 14: 7
51+
1: 3, 2: 3, 3: 3, 4: 3, 5: 3, 6: 3, 7: 4, 8: 4, 9: 4, 10: 5, 11: 6, 12: 7, 13: 7, 14: 7, 15: 8
5252
}

0 commit comments

Comments
 (0)