Skip to content
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

Complete the CI tests. #2342

Merged
merged 32 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
527efa2
Try if statement.
fatcat-z Jun 20, 2024
0d1b6b8
Update if.
fatcat-z Jun 20, 2024
435ed5f
Leverage include to limite the scope.
fatcat-z Jun 21, 2024
ce23443
Fix a typo and rename files.
fatcat-z Jun 21, 2024
dbb2f43
Finish updating 2 CI files.
fatcat-z Jun 21, 2024
f47942e
Remove name of jobs.
fatcat-z Jun 21, 2024
71c3396
Update unit tests ci.
fatcat-z Jun 21, 2024
d73aa75
Correct the includes settings.
fatcat-z Jun 21, 2024
8407a63
Try other scenarios.
fatcat-z Jun 21, 2024
d630410
Refactor include.
fatcat-z Jun 23, 2024
ec0f91a
Refactor include.
fatcat-z Jun 23, 2024
d9f5e19
Update include.
fatcat-z Jun 23, 2024
42d9110
Refactor include.
fatcat-z Jun 23, 2024
6af85c9
Change again.
fatcat-z Jun 23, 2024
b79835d
Move some to common part.
fatcat-z Jun 23, 2024
21790d9
Reformat the value.
fatcat-z Jun 23, 2024
4ed6f2d
Refactor.
fatcat-z Jun 23, 2024
320530b
Refactor
fatcat-z Jun 23, 2024
44a40c6
Refactor.
fatcat-z Jun 23, 2024
7eeee83
Add name.
fatcat-z Jun 23, 2024
fd86a83
Refactor.
fatcat-z Jun 23, 2024
3c7d5ab
Refactor.
fatcat-z Jun 23, 2024
4dd4f9b
Refactor names.
fatcat-z Jun 23, 2024
c746647
Remove a name.
fatcat-z Jun 23, 2024
9e441eb
Move ort_version out of each job.
fatcat-z Jun 24, 2024
eca92fa
Correct all settings.
fatcat-z Jun 24, 2024
e74e670
Complete all settings.
fatcat-z Jun 24, 2024
9d51946
Limit numpy version for CI.
fatcat-z Jun 24, 2024
68f4861
Limit numpy version for unit test.
fatcat-z Jun 24, 2024
b0cd2d5
Update the numpy version for CI.
fatcat-z Jun 24, 2024
399c8a0
Change the combination.
fatcat-z Jun 24, 2024
1eddac5
Remove one check setting.
fatcat-z Jun 24, 2024
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
@@ -1,4 +1,4 @@
name: Keras2onnx Application Tests (CI)
name: Keras2onnx App Test (CI)

on:
pull_request:
Expand All @@ -9,16 +9,33 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.15.0']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -63,6 +80,7 @@ jobs:
pip install transformers==4.2.0
pip install keras-self-attention
pip install pytest pytest-cov pytest-runner
pip install "numpy<2"

pip install -e .

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Keras2onnx Unit Tests (CI)
name: Keras2onnx Unit Test (CI)

on:
pull_request:
Expand All @@ -9,16 +9,37 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.14'
- 'py310-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.15.0']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.14'
tf_version: '2.14.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -46,6 +67,8 @@ jobs:
pip install onnxruntime==${{ matrix.ort_version }}
pip uninstall -y protobuf
pip install "protobuf~=3.20"
pip install "numpy<2"

pip install -e .

echo "----- List all of depdencies:"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,43 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9', '3.10']
name:
- 'py38-tf2.9'
- 'py39-tf2.9'
- 'py39-tf2.15'
- 'py310-tf2.15'
opset_version: ['18', '15']
ort_version: ['1.16.3']
onnx_version: ['1.16.1']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.9'
tf_version: '2.9.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'
- name: 'py37-tf1.15'
tf_version: '1.15.5'
python_version: '3.7'
os: 'ubuntu-latest'
opset_version: '15'
ort_version: '1.14.1'
onnx_version: '1.14.1'

runs-on: ubuntu-latest

Expand All @@ -33,7 +62,7 @@ jobs:
shell: bash
run: |
chmod +x ./tests/utils/setup_test_env.sh
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }}
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }}

- name: Fix Paths (Windows only)
if: runner.os == 'Windows'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pylint Workflow
name: Pylint

on:
pull_request:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit Tests (CI)
name: Unit Test (CI)

on:
pull_request:
Expand All @@ -9,15 +9,46 @@ on:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true

jobs:
run_tests:
strategy:
fail-fast: false
matrix:
tf_version: ['2.9.0', '2.13.0']
python_version: ['3.8', '3.9']
name:
- 'py38-tf2.9'
- 'py39-tf2.10'
- 'py39-tf2.15'
- 'py310-tf2.15'
os: ['ubuntu-latest', 'windows-2022']
opset_version: ['18', '15']
ort_version: ['1.16.3']
os: ['ubuntu-latest', 'windows-2022']
onnx_version: ['1.16.1']
skip_tflite: ['False']
include:
- name: 'py38-tf2.9'
tf_version: '2.9.0'
python_version: '3.8'
- name: 'py39-tf2.10'
tf_version: '2.10.0'
python_version: '3.9'
- name: 'py39-tf2.15'
tf_version: '2.15.0'
python_version: '3.9'
- name: 'py310-tf2.15'
tf_version: '2.15.0'
python_version: '3.10'
- name: 'py37-tf1.15'
tf_version: '1.15.5'
python_version: '3.7'
os: 'ubuntu-latest'
opset_version: '15'
ort_version: '1.14.1'
onnx_version: '1.14.1'
skip_tflite: 'True'

runs-on: ${{ matrix.os }}

Expand All @@ -34,7 +65,7 @@ jobs:
shell: bash
run: |
chmod +x ./tests/utils/setup_test_env.sh
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }}
./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }}

- name: Fix Paths (Windows only)
if: runner.os == 'Windows'
Expand All @@ -49,7 +80,7 @@ jobs:
run: |
export TF2ONNX_TEST_BACKEND=onnxruntime
export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }}
export TF2ONNX_SKIP_TFLITE_TESTS=False
export TF2ONNX_SKIP_TFLITE_TESTS=${{ matrix.skip_tflite }}
export TF2ONNX_SKIP_TFJS_TESTS=True
export TF2ONNX_SKIP_TF_TESTS=False
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
Expand All @@ -60,7 +91,7 @@ jobs:
run: |
set TF2ONNX_TEST_BACKEND=onnxruntime
set TF2ONNX_TEST_OPSET=${{ matrix.opset_version }}
set TF2ONNX_SKIP_TFLITE_TESTS=False
set TF2ONNX_SKIP_TFLITE_TESTS=${{ matrix.skip_tflite }}
set TF2ONNX_SKIP_TFJS_TESTS=True
set TF2ONNX_SKIP_TF_TESTS=False
python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml
Expand Down
10 changes: 6 additions & 4 deletions tests/utils/setup_test_env.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
#!/bin/bash

# # Check if the argument is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <tensorflow_version> <onnxruntime_version>"
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <tensorflow_version> <onnxruntime_version> <onnx_version>"
exit 1
fi

# Assign the argument to a variable
TF_VERSION=$1
ORT_VERSION=$2
ONNX_VERSION=$3

echo "==== TensorFlow version: $TF_VERSION"
echo "==== ONNXRuntime version: $ORT_VERSION"
echo "==== ONNX version: $ONNX_VERSION"

pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator
pip install onnx
pip install onnx==$ONNX_VERSION
pip install onnxruntime==$ORT_VERSION
pip install numpy
pip install "numpy<2"

pip install onnxruntime-extensions
pip install "tensorflow-text<=$TF_VERSION"
Expand Down
Loading