diff --git a/README.md b/README.md index 0287c1247..30b24de49 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr | Build Type | OS | Python | TensorFlow | ONNX opset | Status | | --- | --- | --- | --- | --- | --- | -| Unit Test - Basic | Linux, MacOS\*, Windows\* | 3.7-3.10 | 1.13-1.15, 2.1-2.10 | 13-17 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=main) | -| Unit Test - Full | Linux, MacOS, Windows | 3.7-3.10 | 1.13-1.15, 2.1-2.10 | 13-17 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=main) | | +| Unit Test - Basic | Linux, MacOS\*, Windows\* | 3.7-3.10 | 1.13-1.15, 2.1-2.10 | 14-18 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=16&branchName=main) | +| Unit Test - Full | Linux, MacOS, Windows | 3.7-3.10 | 1.13-1.15, 2.1-2.10 | 14-18 | [![Build Status](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_apis/build/status/unit_test-matrix?branchName=main)](https://dev.azure.com/tensorflow-onnx/tensorflow-onnx/_build/latest?definitionId=18&branchName=main) | |
## Supported Versions @@ -27,10 +27,10 @@ The common issues we run into we try to document here [Troubleshooting Guide](Tr tf2onnx will use the ONNX version installed on your system and installs the latest ONNX version if none is found. -We support and test ONNX opset-13 to opset-17. opset-6 to opset-12 should work but we don't test them. -By default we use ```opset-13``` for the resulting ONNX graph. +We support and test ONNX opset-14 to opset-18. opset-6 to opset-13 should work but we don't test them. +By default we use ```opset-15``` for the resulting ONNX graph. -If you want the graph to be generated with a specific opset, use ```--opset``` in the command line, for example ```--opset 13```. +If you want the graph to be generated with a specific opset, use ```--opset``` in the command line, for example ```--opset 15```. ### TensorFlow @@ -97,9 +97,9 @@ To get started with `tensorflow-onnx`, run the `t2onnx.convert` command, providi ```python -m tf2onnx.convert --saved-model tensorflow-model-path --output model.onnx``` -The above command uses a default of `13` for the ONNX opset. If you need a newer opset, or want to limit your model to use an older opset then you can provide the `--opset` argument to the command. If you are unsure about which opset to use, refer to the [ONNX operator documentation](https://github.com/onnx/onnx/releases). +The above command uses a default of `15` for the ONNX opset. If you need a newer opset, or want to limit your model to use an older opset then you can provide the `--opset` argument to the command. If you are unsure about which opset to use, refer to the [ONNX operator documentation](https://github.com/onnx/onnx/releases). -```python -m tf2onnx.convert --saved-model tensorflow-model-path --opset 17 --output model.onnx``` +```python -m tf2onnx.convert --saved-model tensorflow-model-path --opset 18 --output model.onnx``` If your TensorFlow model is in a format other than `saved model`, then you need to provide the inputs and outputs of the model graph. @@ -192,7 +192,7 @@ ONNX requires default values for graph inputs to be constant, while Tensorflow's #### --opset -By default we use the opset 13 to generate the graph. By specifying ```--opset``` the user can override the default to generate a graph with the desired opset. For example ```--opset 17``` would create a onnx graph that uses only ops available in opset 17. Because older opsets have in most cases fewer ops, some models might not convert on a older opset. +By default we use the opset 15 to generate the graph. By specifying ```--opset``` the user can override the default to generate a graph with the desired opset. For example ```--opset 17``` would create a onnx graph that uses only ops available in opset 17. Because older opsets have in most cases fewer ops, some models might not convert on an older opset. #### --dequantize diff --git a/ci_build/azure_pipelines/keras2onnx_application_tests.yml b/ci_build/azure_pipelines/keras2onnx_application_tests.yml index a6f3a9fab..2f6df9af3 100644 --- a/ci_build/azure_pipelines/keras2onnx_application_tests.yml +++ b/ci_build/azure_pipelines/keras2onnx_application_tests.yml @@ -105,9 +105,9 @@ jobs: INSTALL_NUMPY: NIGHTLY_BUILD_TEST: python run_all_v2.py - Python310-onnx1.13-tf2.9: + Python310-onnx1.12-tf2.9: python.version: '3.10' - ONNX_PATH: onnx==1.13.0 + ONNX_PATH: onnx==1.12.0 INSTALL_KERAS: UNINSTALL_KERAS: INSTALL_TENSORFLOW: pip install tensorflow==2.9.0 diff --git a/ci_build/azure_pipelines/templates/job_generator.yml b/ci_build/azure_pipelines/templates/job_generator.yml index 40361f671..963ba0334 100644 --- a/ci_build/azure_pipelines/templates/job_generator.yml +++ b/ci_build/azure_pipelines/templates/job_generator.yml @@ -5,7 +5,7 @@ parameters: python_versions: ['3.7'] tf_versions: [''] onnx_versions: ['1.13.1'] - onnx_opsets: ['18', '17', '16', '15', '14', '13'] + onnx_opsets: ['18', '17', '16', '15', '14'] onnx_backends: {onnxruntime: ['1.14.1']} job: {} run_setup: 'True' diff --git a/ci_build/azure_pipelines/templates/setup.yml b/ci_build/azure_pipelines/templates/setup.yml index 3fd530ec0..afdce402b 100644 --- a/ci_build/azure_pipelines/templates/setup.yml +++ b/ci_build/azure_pipelines/templates/setup.yml @@ -70,6 +70,10 @@ steps: if [[ $CI_TF_VERSION == 2.9* ]] ; then pip install "tensorflow-text>=2.9,<2.10" + fi + if [[ $CI_TF_VERSION == 2.10* ]] || [[ $CI_TF_VERSION == 2.11* ]] ; + then + pip install "tensorflow-text>=2.10,<2.12" else pip install tensorflow-text fi diff --git a/ci_build/azure_pipelines/templates/unit_test.yml b/ci_build/azure_pipelines/templates/unit_test.yml index f5374f461..a58c424aa 100644 --- a/ci_build/azure_pipelines/templates/unit_test.yml +++ b/ci_build/azure_pipelines/templates/unit_test.yml @@ -1,7 +1,7 @@ # Run unit test parameters: - onnx_opsets: ['18', '17', '16', '15', '14', '13'] + onnx_opsets: ['18', '17', '16', '15', '14'] skip_tflite_tests: 'True' skip_tfjs_tests: 'True' skip_tf_tests: 'False' diff --git a/tf2onnx/constants.py b/tf2onnx/constants.py index 3fdefa117..a6e88ebbd 100644 --- a/tf2onnx/constants.py +++ b/tf2onnx/constants.py @@ -18,8 +18,8 @@ # Default opset version for onnx domain. # The current update policy is that the default should be set to # the latest released version as of 18 months ago. -# Opset 13 was released in ONNX v1.8.0 (Nov, 2020). -PREFERRED_OPSET = 13 +# Opset 15 was released in ONNX v1.10.0 (Jul, 2021). +PREFERRED_OPSET = 15 # Default opset for custom ops TENSORFLOW_OPSET = helper.make_opsetid("ai.onnx.converters.tensorflow", 1)