Skip to content

Commit 9bcef5e

Browse files
committed
Try tf 2.18.0 version.
Signed-off-by: Jay Zhang <[email protected]>
1 parent e1042c5 commit 9bcef5e

File tree

7 files changed

+19
-12
lines changed

7 files changed

+19
-12
lines changed

.github/actions/keras_application_test/action.yml

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ runs:
5858
pip install numpy==1.19.0
5959
else
6060
pip install transformers
61+
pip install tf_keras
6162
pip install "numpy<2"
6263
fi
6364
@@ -71,5 +72,7 @@ runs:
7172
run: |
7273
python -c "import onnxruntime"
7374
pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml
75+
76+
export TF_USE_LEGACY_KERAS=True
7477
cd tests/keras2onnx_applications/nightly_build
7578
python run_all_v2.py

.github/actions/keras_unit_test/action.yml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ runs:
3636
if [[ ${{ inputs.tf_version }} == 1.* ]]; then
3737
pip install numpy==1.19.0
3838
else
39+
pip install tf_keras
3940
pip install "numpy<2"
4041
fi
4142
@@ -48,6 +49,7 @@ runs:
4849
shell: bash
4950
if: runner.os == 'Linux'
5051
run: |
52+
export TF_USE_LEGACY_KERAS=True
5153
python -c "import onnxruntime"
5254
python -c "import onnxconverter_common"
5355
pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml

.github/actions/unit_test/action.yml

+2
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ runs:
4646
export TF2ONNX_SKIP_TFLITE_TESTS=${{ inputs.skip_tflite }}
4747
export TF2ONNX_SKIP_TFJS_TESTS=True
4848
export TF2ONNX_SKIP_TF_TESTS=False
49+
export TF_USE_LEGACY_KERAS=True
4950
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
5051
ls
5152
@@ -58,5 +59,6 @@ runs:
5859
set TF2ONNX_SKIP_TFLITE_TESTS=${{ inputs.skip_tflite }}
5960
set TF2ONNX_SKIP_TFJS_TESTS=True
6061
set TF2ONNX_SKIP_TF_TESTS=False
62+
set TF_USE_LEGACY_KERAS=True
6163
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
6264
ls

.github/workflows/keras_application_test_ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
- name: Checkout code
4949
uses: actions/checkout@v4
5050

51-
- name: Run Tests (Py310-TF2.15)
51+
- name: Run Tests (Py310-TF2.18)
5252
uses: ./.github/actions/keras_application_test
5353
with:
54-
tf_version: '2.15.0'
54+
tf_version: '2.18.0'
5555
python_version: '3.10'
5656
ort_version: '1.16.3'
5757
onnx_version: '1.16.1'
@@ -60,7 +60,7 @@ jobs:
6060
if: always()
6161
uses: actions/upload-artifact@v3
6262
with:
63-
name: Test Results (Py310-TF2.15-ubuntu)
63+
name: Test Results (Py310-TF2.18-ubuntu)
6464
path: ./**/test-results-*.xml
6565

6666
Test_py37_with_tf1_15: # Do not change this name because it is used in Ruleset of this repo.

.github/workflows/keras_unit_test_ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ jobs:
4747
- name: Checkout code
4848
uses: actions/checkout@v4
4949

50-
- name: Run Tests (Py310-TF2.15)
50+
- name: Run Tests (Py310-TF2.18)
5151
uses: ./.github/actions/keras_unit_test
5252
with:
53-
tf_version: '2.15.0'
53+
tf_version: '2.18.0'
5454
python_version: '3.10'
5555
ort_version: '1.16.3'
5656
onnx_version: '1.16.1'
@@ -59,7 +59,7 @@ jobs:
5959
if: always()
6060
uses: actions/upload-artifact@v3
6161
with:
62-
name: Test Results (Py310-TF2.15-ubuntu)
62+
name: Test Results (Py310-TF2.18-ubuntu)
6363
path: ./**/test-results-*.xml
6464

6565
Test_py37_with_tf1_15: # Do not change this name because it is used in Ruleset of this repo.

.github/workflows/pretrained_model_test_ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
- name: Checkout code
5252
uses: actions/checkout@v4
5353

54-
- name: Run Tests (Py310-TF2.15-18)
54+
- name: Run Tests (Py310-TF2.18-18)
5555
uses: ./.github/actions/pretrained_model_test
5656
with:
5757
os: 'ubuntu-latest'
58-
tf_version: '2.15.0'
58+
tf_version: '2.18.0'
5959
python_version: '3.10'
6060
ort_version: '1.16.3'
6161
onnx_version: '1.16.1'
@@ -66,7 +66,7 @@ jobs:
6666
if: always()
6767
uses: actions/upload-artifact@v3
6868
with:
69-
name: Test Results (Py310-TF2.15-18-ubuntu)
69+
name: Test Results (Py310-TF2.18-18-ubuntu)
7070
path: ./**/test-results-*.xml
7171

7272
Test_py37_with_tf1_15: # Do not change this name because it is used in 'publish-test-results' section below.

.github/workflows/unit_test_ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ jobs:
5151
- name: Checkout code
5252
uses: actions/checkout@v4
5353

54-
- name: Run Tests (Py310-TF2.15-18)
54+
- name: Run Tests (Py310-TF2.18-18)
5555
uses: ./.github/actions/unit_test
5656
with:
5757
os: 'ubuntu-latest'
58-
tf_version: '2.15.0'
58+
tf_version: '2.18.0'
5959
python_version: '3.10'
6060
ort_version: '1.16.3'
6161
onnx_version: '1.16.1'
@@ -66,7 +66,7 @@ jobs:
6666
if: always()
6767
uses: actions/upload-artifact@v3
6868
with:
69-
name: Test Results (Py310-TF2.15-18-ubuntu)
69+
name: Test Results (Py310-TF2.18-18-ubuntu)
7070
path: ./**/test-results-*.xml
7171

7272
Extra_tests:

0 commit comments

Comments
 (0)