Skip to content

CI pipeline upgrade. #2171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run(self):
author='ONNX',
author_email='[email protected]',
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',
Expand Down
4 changes: 2 additions & 2 deletions tests/keras2onnx_applications/nightly_build/test_chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion tests/keras2onnx_unit_tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down