Skip to content

Commit 6f5a673

Browse files
authored
Update protobuf version in ci (#1951)
* update protobuf version in ci Signed-off-by: Deyu Huang <deyhuang@microsoft.com> * add change in unit_test Signed-off-by: Deyu Huang <deyhuang@microsoft.com>
1 parent aaab800 commit 6f5a673

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ steps:
1919
python -m pip install --upgrade pip
2020
conda config --set always_yes yes --set changeps1 no
2121
pip install $(ONNX_PATH)
22+
pip uninstall -y protobuf
23+
pip install "protobuf<4.21.0"
2224
pip install h5py==2.9.0
2325
pip install parameterized
2426
$(INSTALL_TENSORFLOW)
@@ -81,7 +83,7 @@ steps:
8183
echo Test numpy installation... && python -c "import numpy"
8284
pip install %ONNX_PATH%
8385
pip uninstall -y protobuf
84-
pip install protobuf
86+
pip install "protobuf<4.21.0"
8587
pip install h5py==2.9.0
8688
pip install parameterized
8789
%INSTALL_TENSORFLOW%

ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ steps:
1919
python -m pip install --upgrade pip
2020
conda config --set always_yes yes --set changeps1 no
2121
pip install $(ONNX_PATH)
22+
pip uninstall -y protobuf
23+
pip install "protobuf<4.21.0"
2224
pip install h5py==2.9.0
2325
pip install parameterized
2426
pip install $(TENSORFLOW_PATH)
@@ -71,7 +73,7 @@ steps:
7173
echo Test numpy installation... && python -c "import numpy"
7274
pip install %ONNX_PATH%
7375
pip uninstall -y protobuf
74-
pip install protobuf
76+
pip install "protobuf<4.21.0"
7577
pip install h5py==2.9.0
7678
pip install parameterized
7779
pip install %TENSORFLOW_PATH%

ci_build/azure_pipelines/templates/setup.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ steps:
66
pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized
77
pip install $(CI_PIP_TF_NAME) $(CI_PIP_ONNX_NAME)
88
9+
# protobuf release version 4.21.0 has some Python changes which is not compatible with tensorflow so far.
10+
pip uninstall -y protobuf
11+
pip install "protobuf<4.21.0"
12+
913
# TF < 2.7 reuires numpy <= 1.19, but onnxruntime >= 1.11 requires numpy >= 1.21
1014
if [[ $CI_TF_VERSION < 2.7 ]] && [[ $CI_ONNX_BACKEND == "onnxruntime" ]] ;
1115
then

0 commit comments

Comments
 (0)