diff --git a/ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml b/ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml index a789f84fe..183b2fcfe 100644 --- a/ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml +++ b/ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml @@ -47,7 +47,7 @@ jobs: Python38-tf2-2.11: python.version: '3.9' - ONNX_PATH: onnx==1.13.1 + ONNX_PATH: onnx==1.14 INSTALL_KERAS: UNINSTALL_KERAS: INSTALL_TENSORFLOW: pip install tensorflow==2.11.0 diff --git a/ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml b/ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml index 6bd232cb0..36008fd49 100644 --- a/ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml +++ b/ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml @@ -25,7 +25,7 @@ jobs: Python310-tf-latest: python.version: '3.10' - ONNX_PATH: onnx==1.13.1 + ONNX_PATH: onnx==1.14 TENSORFLOW_PATH: tensorflow==2.11.0 INSTALL_ORT: pip install onnxruntime==1.13.1 INSTALL_NUMPY: @@ -66,7 +66,7 @@ jobs: Python310-tf-latest: python.version: '3.10' - ONNX_PATH: onnx==1.13.1 + ONNX_PATH: onnx==1.14 TENSORFLOW_PATH: tensorflow==2.11.0 INSTALL_ORT: pip install onnxruntime==1.14.1 INSTALL_NUMPY: diff --git a/setup.py b/setup.py index 598f08c91..fcb31c3b3 100644 --- a/setup.py +++ b/setup.py @@ -82,7 +82,7 @@ def run(self): author='ONNX', author_email='onnx-technical-discuss@lists.lfaidata.foundation', url='https://github.com/onnx/tensorflow-onnx', - install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers<3.0,>=1.12'], + install_requires=['numpy>=1.14.1', 'onnx>=1.4.1', 'requests', 'six', 'flatbuffers<3.0,>=1.12', 'protobuf~=3.20.2'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', diff --git a/tests/keras2onnx_applications/nightly_build/test_chatbot.py b/tests/keras2onnx_applications/nightly_build/test_chatbot.py index e7bf05e46..abac15857 100644 --- a/tests/keras2onnx_applications/nightly_build/test_chatbot.py +++ b/tests/keras2onnx_applications/nightly_build/test_chatbot.py @@ -9,7 +9,7 @@ from mock_keras2onnx.proto.tfcompat import is_tf2 from os.path import dirname, abspath sys.path.insert(0, os.path.join(dirname(abspath(__file__)), '../../keras2onnx_tests/')) -from test_utils import run_keras_and_ort, test_level_0 +from test_utils import run_keras_and_ort, test_level_0, get_max_opset_supported_for_test K = keras.backend Activation = keras.layers.Activation @@ -96,7 +96,7 @@ def test_chatbot(self): data1 = np.random.rand(2, 12).astype(np.float32) data2 = np.random.rand(2, 12).astype(np.float32) expected = keras_model.predict([data1, data2]) - onnx_model = mock_keras2onnx.convert_keras(keras_model, keras_model.name) + onnx_model = mock_keras2onnx.convert_keras(keras_model, keras_model.name, target_opset=get_max_opset_supported_for_test()) self.assertTrue( run_keras_and_ort(onnx_model.graph.name, onnx_model, keras_model, [data1, data2], expected, self.model_files)) diff --git a/tests/keras2onnx_unit_tests/test_utils.py b/tests/keras2onnx_unit_tests/test_utils.py index e596b831d..82b5e1098 100644 --- a/tests/keras2onnx_unit_tests/test_utils.py +++ b/tests/keras2onnx_unit_tests/test_utils.py @@ -299,7 +299,7 @@ def run_image(model, model_files, img_path, model_name='onnx_conversion', rtol=1 except RuntimeError: msg = 'keras prediction throws an exception for model ' + model.name + ', skip comparison.' - onnx_model = mock_keras2onnx.convert_keras(model, model.name) + onnx_model = mock_keras2onnx.convert_keras(model, model.name, target_opset=get_max_opset_supported_for_test()) res = run_onnx_runtime(model_name, onnx_model, x, preds, model_files, rtol=rtol, atol=atol, compare_perf=compare_perf) return res, msg