Skip to content

Commit 4a6b320

Browse files
committed
ci
Signed-off-by: xadupre <[email protected]>
1 parent e1ba6d4 commit 4a6b320

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

.github/actions/keras_application_test/action.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ runs:
2424
python -m pip install --upgrade pip
2525
pip install onnxconverter-common
2626
pip install onnx==${{ inputs.onnx_version }}
27-
pip uninstall -y protobuf
28-
pip install "protobuf~=3.20"
2927
pip install h5py
3028
pip install parameterized
3129
pip install timeout-decorator
3230
pip install coloredlogs flatbuffers
33-
pip install tensorflow==${{ inputs.tf_version }}
3431
pip install onnxruntime==${{ inputs.ort_version }}
3532
pip install pillow
3633
pip install opencv-python
@@ -50,10 +47,6 @@ runs:
5047
pip install keras-self-attention
5148
pip install pytest pytest-cov pytest-runner
5249
53-
if [[ ${{ inputs.tf_version }} <= 2.15 ]]; then
54-
pip install "protobuf<3.20"
55-
fi
56-
5750
if [[ ${{ inputs.tf_version }} == 1.* ]]; then
5851
pip install keras==2.3.1
5952
pip install transformers==4.2.0
@@ -62,8 +55,10 @@ runs:
6255
pip install numpy==1.19.0
6356
else
6457
pip install transformers
65-
if [[ ${{ inputs.tf_version }} != 2.13 && ${{ inputs.tf_version }} != 2.9 ]]; then
66-
pip install tf_keras==${{ inputs.tf_version }}
58+
if [[ "${{ inputs.tf_version }}" != "2.13" && "${{ inputs.tf_version }}" != "2.9" ]]; then
59+
pip install tf_keras==${{ inputs.tf_version }} tensorflow==${{ inputs.tf_version }}
60+
else
61+
pip install "protobuf<3.20" tensorflow==${{ inputs.tf_version }}
6762
fi
6863
fi
6964

.github/actions/keras_unit_test/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@ runs:
2828
pip install parameterized
2929
pip install timeout-decorator
3030
pip install coloredlogs flatbuffers
31-
pip install tensorflow==${{ inputs.tf_version }}
3231
pip install pytest pytest-cov pytest-runner
3332
pip install onnxruntime==${{ inputs.ort_version }}
3433
pip uninstall -y protobuf
35-
pip install "protobuf~=3.20"
3634
if [[ ${{ inputs.tf_version }} == 1.* ]]; then
3735
pip install numpy==1.19.0
3836
else
39-
if [[ ${{ inputs.tf_version }} != 2.13 && ${{ inputs.tf_version }} != 2.9 ]]; then
40-
pip install tf_keras==${{ inputs.tf_version }}
37+
if [[ "${{ inputs.tf_version }}" != "2.13" && "${{ inputs.tf_version }}" != "2.9" ]]; then
38+
pip install tf_keras==${{ inputs.tf_version }} tensorflow==${{ inputs.tf_version }}
39+
else
40+
pip install "protobuf<3.20" tensorflow==${{ inputs.tf_version }}
4141
fi
4242
fi
4343

tests/utils/setup_test_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pip install onnx==$ONNX_VERSION onnxruntime==$ORT_VERSION onnxruntime-extensions
2222
if [[ $TF_VERSION == 1.* ]]; then
2323
pip install numpy==1.19.0
2424
else
25-
if [[ ${{ inputs.tf_version }} != 2.13 && ${{ inputs.tf_version }} != 2.9 ]]; then
25+
if [[ "$TF_VERSION" != "2.13" && "$TF_VERSION" != "2.9" ]]; then
2626
pip install tf_keras==$TF_VERSION
2727
fi
2828
fi

0 commit comments

Comments
 (0)