From ed022438576ca7a351c3858105439f4f25c35219 Mon Sep 17 00:00:00 2001 From: Alexis Tsogias <1114095+Zyrin@users.noreply.github.com> Date: Mon, 11 Mar 2024 03:28:12 +0100 Subject: [PATCH 001/124] Add support for Erf and Selu in transpose_optimizer.py. (#2311) Signed-off-by: Alexis Tsogias Co-authored-by: Alexis Tsogias --- tf2onnx/optimizer/transpose_optimizer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tf2onnx/optimizer/transpose_optimizer.py b/tf2onnx/optimizer/transpose_optimizer.py index cc16e5f05..76f897828 100644 --- a/tf2onnx/optimizer/transpose_optimizer.py +++ b/tf2onnx/optimizer/transpose_optimizer.py @@ -201,6 +201,7 @@ def _initialize_handlers(self): "Clip": self._simple_through_handler, "Concat": self._concat_handler, "Elu": self._simple_through_handler, + "Erf": self._simple_through_handler, "Exp": self._simple_through_handler, "Identity": self._identity_handler, "LeakyRelu": self._simple_through_handler, @@ -222,6 +223,7 @@ def _initialize_handlers(self): "ReduceSum": self._reducesum_handler, "ReduceSumSquare": self._reduce_handler, "Relu": self._simple_through_handler, + "Selu": self._simple_through_handler, "Shape": self._shape_handler, "Sigmoid": self._simple_through_handler, "Softmax": self._softmax_handler, From 1b69d59314696c489eb0bfa3d3391afa8c954f4e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 23 May 2024 06:07:00 +0000 Subject: [PATCH 002/124] Add pylint github action file. --- .github/workflows/pylint.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/pylint.yml diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 000000000..fcadf089e --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,29 @@ +name: Pylint Workflow + +on: + push: + branches: + - main + +jobs: + pylint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 # Specify the desired Python version (e.g., 3.8, 3.9) + + - name: Install dependencies + run: pip install pylint==2.4.4 + + - name: Run pylint + run: | + pip freeze + pylint --rcfile=tools/pylintrc --ignore=version.py,tflite --disable=cyclic-import tf2onnx tests/*.py tools -j 0 + displayName: 'Pylint' + +# Add other jobs or steps as needed From dbf80ec5eefade899d2f123003c0896e2b6f7e94 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 28 May 2024 11:03:22 +0000 Subject: [PATCH 003/124] Rename pylint_action.yaml file. Signed-off-by: Jay Zhang --- .github/workflows/{pylint.yml => pylint_action.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{pylint.yml => pylint_action.yml} (89%) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint_action.yml similarity index 89% rename from .github/workflows/pylint.yml rename to .github/workflows/pylint_action.yml index fcadf089e..f57c927a5 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint_action.yml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.8 # Specify the desired Python version (e.g., 3.8, 3.9) From 1c30ba3d9bddcaf434aec813babb197746776934 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 28 May 2024 11:06:46 +0000 Subject: [PATCH 004/124] Make a try. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 19 +++++ .github/workflows/setup.yml | 65 ++++++++++++++++ .github/workflows/unit_test_matrix.yml | 76 +++++++++++++++++++ .../azure_pipelines/coveragerc | 0 .../keras2onnx_application_tests.yml | 0 .../azure_pipelines/keras2onnx_unit_test.yml | 0 .../onnxruntime_nightly_test.yml | 0 .../pretrained_model_test-matrix.yml | 0 .../azure_pipelines/pretrained_model_test.yml | 0 .../azure_pipelines/pylint.yml | 0 .../templates/combine_test_coverage.yml | 0 .../templates/job_generator.yml | 0 .../keras2onnx_application_tests.yml | 0 .../templates/keras2onnx_unit_test.yml | 0 .../templates/pretrained_model_test.yml | 0 .../azure_pipelines/templates/setup.yml | 0 .../azure_pipelines/templates/unit_test.yml | 0 .../trimmed_keras2onnx_application_tests.yml | 0 .../trimmed_keras2onnx_unit_test.yml | 0 .../azure_pipelines/unit_test-matrix.yml | 0 .../azure_pipelines/unit_test.yml | 0 21 files changed, 160 insertions(+) create mode 100644 .github/workflows/main.yml create mode 100644 .github/workflows/setup.yml create mode 100644 .github/workflows/unit_test_matrix.yml rename {ci_build => deleted_ci_build}/azure_pipelines/coveragerc (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/keras2onnx_application_tests.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/keras2onnx_unit_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/onnxruntime_nightly_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/pretrained_model_test-matrix.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/pretrained_model_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/pylint.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/combine_test_coverage.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/job_generator.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/keras2onnx_application_tests.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/keras2onnx_unit_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/pretrained_model_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/setup.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/templates/unit_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/trimmed_keras2onnx_application_tests.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/trimmed_keras2onnx_unit_test.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/unit_test-matrix.yml (100%) rename {ci_build => deleted_ci_build}/azure_pipelines/unit_test.yml (100%) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..c56eea366 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,19 @@ +# .github/workflows/main.yml + +name: My Workflow + +on: + push: + branches: + - main + +jobs: + my-job: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + # Call the composite action defined in my-action.yml + - uses: ./.github/workflows/my-action \ No newline at end of file diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml new file mode 100644 index 000000000..6d284e521 --- /dev/null +++ b/.github/workflows/setup.yml @@ -0,0 +1,65 @@ +name: Setup Environment + +on: + push: + branches: + - main + +jobs: + setup: + runs-on: ubuntu-latest + + steps: + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.x + + - name: Install dependencies + run: | + pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + pip install ${{ env.CI_PIP_ONNX_NAME }} + pip install ${{ env.CI_PIP_ONNX_BACKEND_NAME }} numpy + + if [[ ${{ env.CI_SKIP_TFJS_TESTS }} == "False" ]]; then + pip install tensorflowjs==3.18.0 + npm install @tensorflow/tfjs + fi + + if [[ ${{ env.CI_TF_VERSION }} == 2.* ]]; then + pip install onnxruntime-extensions + pip install "tensorflow-text<=$(env.CI_TF_VERSION)" + fi + + if [[ ${{ env.CI_ONNXRUNTIME_NIGHTLY }} == "true" ]]; then + pip uninstall -y onnxruntime + # install numpy upfront since it is not on https://test.pypi.org/simple/ + pip install 'numpy>=1.18' + pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly + fi + + pip uninstall -y tensorflow + pip install ${{ env.CI_PIP_TF_NAME }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + + python setup.py install + + if [[ ${{ env.ONNX_TEST }} == "true" ]]; then + # onnx-weekly won't satisfy onnx requirement so uninstallation must happen here + pip uninstall -y onnx + pip install --index-url https://test.pypi.org/simple/ ${{ env.PIP_ONNX_NAME:-onnx }} + fi + + pip freeze --all + + - name: Fix Paths (Windows only) + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" + + - name: Display Environment Variables + run: env diff --git a/.github/workflows/unit_test_matrix.yml b/.github/workflows/unit_test_matrix.yml new file mode 100644 index 000000000..1c63dae6d --- /dev/null +++ b/.github/workflows/unit_test_matrix.yml @@ -0,0 +1,76 @@ +name: Unit Tests + +on: + push: + branches: + - main + +jobs: + unit_tests: + runs-on: ${{ matrix.platform }} + strategy: + matrix: + python_version: ${{ matrix.python_versions }} + tf_version: ${{ matrix.tf_versions }} + onnx_opset: ${{ matrix.onnx_opsets }} + include: + - python_versions: ['3.8'] + tf_versions: ['2.9.0'] + onnx_opsets: ['17', '16', '14'] + platforms: ['linux', 'windows'] + - python_versions: ['3.9'] + tf_versions: ['2.15.0'] + onnx_opsets: ['17', '16', '14'] + platforms: ['linux', 'windows'] + - python_versions: ['3.7'] + tf_versions: ['1.15.5'] + onnx_opsets: ['18', '17', '16', '15'] + platforms: ['windows'] + - python_versions: ['3.7'] + tf_versions: ['1.15.5'] + onnx_opsets: ['18', '17', '16'] + platforms: ['linux'] + - python_versions: ['3.10'] + tf_versions: ['2.14.0'] + platforms: ['linux', 'windows'] + - python_versions: ['3.9'] + tf_versions: ['2.12.0'] + platforms: ['linux', 'windows'] + - python_versions: ['3.8'] + tf_versions: ['2.10.0', '2.11.0'] + platforms: ['linux', 'windows'] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python_version }} + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run unit tests + run: pytest tests/ + + - name: Generate coverage report + if: ${{ matrix.report_coverage == 'True' }} + run: coverage report + + # Add other steps as needed for your specific use case + + combine_coverage: + runs-on: ubuntu-latest + needs: unit_tests + steps: + - name: Combine coverage reports + run: coverage combine + - name: Upload coverage report + uses: actions/upload-artifact@v2 + with: + name: coverage-report + path: .coverage + +# Add other workflows or jobs as necessary diff --git a/ci_build/azure_pipelines/coveragerc b/deleted_ci_build/azure_pipelines/coveragerc similarity index 100% rename from ci_build/azure_pipelines/coveragerc rename to deleted_ci_build/azure_pipelines/coveragerc diff --git a/ci_build/azure_pipelines/keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml similarity index 100% rename from ci_build/azure_pipelines/keras2onnx_application_tests.yml rename to deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml diff --git a/ci_build/azure_pipelines/keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml similarity index 100% rename from ci_build/azure_pipelines/keras2onnx_unit_test.yml rename to deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml diff --git a/ci_build/azure_pipelines/onnxruntime_nightly_test.yml b/deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml similarity index 100% rename from ci_build/azure_pipelines/onnxruntime_nightly_test.yml rename to deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml diff --git a/ci_build/azure_pipelines/pretrained_model_test-matrix.yml b/deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml similarity index 100% rename from ci_build/azure_pipelines/pretrained_model_test-matrix.yml rename to deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml diff --git a/ci_build/azure_pipelines/pretrained_model_test.yml b/deleted_ci_build/azure_pipelines/pretrained_model_test.yml similarity index 100% rename from ci_build/azure_pipelines/pretrained_model_test.yml rename to deleted_ci_build/azure_pipelines/pretrained_model_test.yml diff --git a/ci_build/azure_pipelines/pylint.yml b/deleted_ci_build/azure_pipelines/pylint.yml similarity index 100% rename from ci_build/azure_pipelines/pylint.yml rename to deleted_ci_build/azure_pipelines/pylint.yml diff --git a/ci_build/azure_pipelines/templates/combine_test_coverage.yml b/deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml similarity index 100% rename from ci_build/azure_pipelines/templates/combine_test_coverage.yml rename to deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml diff --git a/ci_build/azure_pipelines/templates/job_generator.yml b/deleted_ci_build/azure_pipelines/templates/job_generator.yml similarity index 100% rename from ci_build/azure_pipelines/templates/job_generator.yml rename to deleted_ci_build/azure_pipelines/templates/job_generator.yml diff --git a/ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml similarity index 100% rename from ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml rename to deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml diff --git a/ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml similarity index 100% rename from ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml rename to deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml diff --git a/ci_build/azure_pipelines/templates/pretrained_model_test.yml b/deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml similarity index 100% rename from ci_build/azure_pipelines/templates/pretrained_model_test.yml rename to deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml diff --git a/ci_build/azure_pipelines/templates/setup.yml b/deleted_ci_build/azure_pipelines/templates/setup.yml similarity index 100% rename from ci_build/azure_pipelines/templates/setup.yml rename to deleted_ci_build/azure_pipelines/templates/setup.yml diff --git a/ci_build/azure_pipelines/templates/unit_test.yml b/deleted_ci_build/azure_pipelines/templates/unit_test.yml similarity index 100% rename from ci_build/azure_pipelines/templates/unit_test.yml rename to deleted_ci_build/azure_pipelines/templates/unit_test.yml diff --git a/ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml similarity index 100% rename from ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml rename to deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml diff --git a/ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml similarity index 100% rename from ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml rename to deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml diff --git a/ci_build/azure_pipelines/unit_test-matrix.yml b/deleted_ci_build/azure_pipelines/unit_test-matrix.yml similarity index 100% rename from ci_build/azure_pipelines/unit_test-matrix.yml rename to deleted_ci_build/azure_pipelines/unit_test-matrix.yml diff --git a/ci_build/azure_pipelines/unit_test.yml b/deleted_ci_build/azure_pipelines/unit_test.yml similarity index 100% rename from ci_build/azure_pipelines/unit_test.yml rename to deleted_ci_build/azure_pipelines/unit_test.yml From 86f8450916afd204b4a9bd870e5e7681697f746a Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 30 May 2024 14:18:54 +0000 Subject: [PATCH 005/124] Add a new trigger for PR. Signed-off-by: Jay Zhang --- .github/workflows/pylint_action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pylint_action.yml b/.github/workflows/pylint_action.yml index f57c927a5..a9266632f 100644 --- a/.github/workflows/pylint_action.yml +++ b/.github/workflows/pylint_action.yml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: jobs: pylint: From e018b5a58b928dde3495bebfd3ef26b871e0ac51 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 30 May 2024 14:24:47 +0000 Subject: [PATCH 006/124] Remove invalid field. Signed-off-by: Jay Zhang --- .github/workflows/pylint_action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pylint_action.yml b/.github/workflows/pylint_action.yml index a9266632f..0852e2f54 100644 --- a/.github/workflows/pylint_action.yml +++ b/.github/workflows/pylint_action.yml @@ -25,6 +25,5 @@ jobs: run: | pip freeze pylint --rcfile=tools/pylintrc --ignore=version.py,tflite --disable=cyclic-import tf2onnx tests/*.py tools -j 0 - displayName: 'Pylint' # Add other jobs or steps as needed From c02de6268546aa338e560b57f48b50caaa625c35 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 31 May 2024 03:26:31 +0000 Subject: [PATCH 007/124] Update code by pylint suggestions. Signed-off-by: Jay Zhang --- .github/workflows/{pylint_action.yml => pylint.yml} | 0 tests/run_pretrained_models.py | 3 ++- 2 files changed, 2 insertions(+), 1 deletion(-) rename .github/workflows/{pylint_action.yml => pylint.yml} (100%) diff --git a/.github/workflows/pylint_action.yml b/.github/workflows/pylint.yml similarity index 100% rename from .github/workflows/pylint_action.yml rename to .github/workflows/pylint.yml diff --git a/tests/run_pretrained_models.py b/tests/run_pretrained_models.py index c81e1f322..9f0a7e0d4 100644 --- a/tests/run_pretrained_models.py +++ b/tests/run_pretrained_models.py @@ -16,6 +16,7 @@ import time import zipfile import random +import six from collections import namedtuple from packaging.version import Version @@ -23,7 +24,7 @@ import yaml import numpy as np import PIL.Image -import six + os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" import tensorflow as tf From c4f9dcf573673a7afb54e00b592e978ae6b1cb55 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 31 May 2024 03:34:45 +0000 Subject: [PATCH 008/124] Update code by pylint suggestions. Signed-off-by: Jay Zhang --- tests/run_pretrained_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run_pretrained_models.py b/tests/run_pretrained_models.py index 9f0a7e0d4..a6a952af3 100644 --- a/tests/run_pretrained_models.py +++ b/tests/run_pretrained_models.py @@ -16,8 +16,9 @@ import time import zipfile import random -import six + from collections import namedtuple +import six from packaging.version import Version From ceb508bf06f2c9a1a72b6ab70703532aca74ef6e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 10:27:31 +0000 Subject: [PATCH 009/124] Try main workflow. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c56eea366..11442895a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,11 +1,12 @@ # .github/workflows/main.yml -name: My Workflow +name: Main Workflow on: push: branches: - main + pull_request: jobs: my-job: @@ -16,4 +17,4 @@ jobs: uses: actions/checkout@v2 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/my-action \ No newline at end of file + - uses: ./.github/workflows/setup \ No newline at end of file From 2e1efd47d3443f100e6d8083104725fb11dda4a7 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 11:22:18 +0000 Subject: [PATCH 010/124] Update setup. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 4 ++-- .github/workflows/setup.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 11442895a..9f9091be3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup \ No newline at end of file + - uses: ./.github/workflows/setup-common \ No newline at end of file diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 6d284e521..fac4b26c1 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -1,4 +1,4 @@ -name: Setup Environment +name: setup-common on: push: From db24398a868c2b3b231bb87bb4ec84dd9b9f1e94 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 11:27:44 +0000 Subject: [PATCH 011/124] Update the call to setup.yml. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9f9091be3..2d06e3dee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,4 +17,4 @@ jobs: uses: actions/checkout@v4 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup-common \ No newline at end of file + - uses: ./.github/workflows/setup.yml \ No newline at end of file From a1deb25bcaed7bde6796e6b20dddddc80d99f98e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 11:33:11 +0000 Subject: [PATCH 012/124] Update. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2d06e3dee..38da5fc2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,4 +17,4 @@ jobs: uses: actions/checkout@v4 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup.yml \ No newline at end of file + - uses: ./.github/workflows/setup \ No newline at end of file From 2e9c83e03dc65d5380cbc72936bc1edeb398ac65 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 11:38:05 +0000 Subject: [PATCH 013/124] Update it. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38da5fc2c..9017ea421 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,4 +17,4 @@ jobs: uses: actions/checkout@v4 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup \ No newline at end of file + - uses: ./.github/workflows/pylint.yml \ No newline at end of file From aa849948dd5ebdfb8b39a9313c938024161aa067 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 12:01:17 +0000 Subject: [PATCH 014/124] Update. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9017ea421..69a2a6da3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,4 +17,4 @@ jobs: uses: actions/checkout@v4 # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/pylint.yml \ No newline at end of file + - uses: ./.github/workflows/setup.yml@migrate_ci \ No newline at end of file From 31153a5a862c31e099dc91ca4fa0778e8d6cfb5b Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 12:09:08 +0000 Subject: [PATCH 015/124] Update checkout branch. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 69a2a6da3..14b1ad310 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + path: migrate_ci # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup.yml@migrate_ci \ No newline at end of file + - uses: ./.github/workflows/setup.yml \ No newline at end of file From 410c9fe4dec0b254bb76cc2552a5d4bd65a0612c Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 12:13:28 +0000 Subject: [PATCH 016/124] Correct the branch name. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14b1ad310..311ec3d07 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: - path: migrate_ci + ref: migrate_ci # Call the composite action defined in my-action.yml - uses: ./.github/workflows/setup.yml \ No newline at end of file From ac8f9bf5199f4b0d18cb1039f0ba776f186bd056 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 12:22:17 +0000 Subject: [PATCH 017/124] Update correct branch. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 311ec3d07..98361919b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,6 +16,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 with: + repository: fatcat-z/tensorflow-onnx ref: migrate_ci # Call the composite action defined in my-action.yml From fd04a847f700d878993a7711f254ca6b6a94fbba Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sat, 1 Jun 2024 12:29:07 +0000 Subject: [PATCH 018/124] Add a check for folder. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98361919b..1cd012f90 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,5 +19,8 @@ jobs: repository: fatcat-z/tensorflow-onnx ref: migrate_ci + - name: Check folder + run: ls ./.github/workflows/ + # Call the composite action defined in my-action.yml - uses: ./.github/workflows/setup.yml \ No newline at end of file From 9cc1435e97676257b072970d243da104df11d9a1 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 07:21:46 +0000 Subject: [PATCH 019/124] Update the call. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1cd012f90..ccd474f4d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,4 +23,9 @@ jobs: run: ls ./.github/workflows/ # Call the composite action defined in my-action.yml - - uses: ./.github/workflows/setup.yml \ No newline at end of file + - name: Run my action + uses: ./.github/workflows/setup-common + + # Call the composite action defined in my-action.yml + - name: Run my action yml + uses: ./.github/workflows/setup.yml \ No newline at end of file From 02d2d113024b15475b528e59c9b85f441d653a88 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 07:27:49 +0000 Subject: [PATCH 020/124] Update the position of the call. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccd474f4d..b72da11a7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,9 +23,8 @@ jobs: run: ls ./.github/workflows/ # Call the composite action defined in my-action.yml - - name: Run my action - uses: ./.github/workflows/setup-common + # - name: Run my action + # uses: ./.github/workflows/setup-common - # Call the composite action defined in my-action.yml - - name: Run my action yml - uses: ./.github/workflows/setup.yml \ No newline at end of file + call-setup-yml: + uses: ./.github/workflows/setup.yml \ No newline at end of file From ccbd0e44a83700c7e938f04a9a27bd252ef14f64 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 07:36:47 +0000 Subject: [PATCH 021/124] Add a trigger. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index fac4b26c1..def54b530 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -4,6 +4,7 @@ on: push: branches: - main + workflow_call: jobs: setup: From a14008ed79fcdcf56bffc8281a298b67923ba772 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 07:39:34 +0000 Subject: [PATCH 022/124] Remove wrong statements. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index def54b530..9ba957921 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -19,39 +19,18 @@ jobs: - name: Install dependencies run: | pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator - pip install ${{ env.CI_PIP_ONNX_NAME }} - pip install ${{ env.CI_PIP_ONNX_BACKEND_NAME }} numpy + pip install numpy - if [[ ${{ env.CI_SKIP_TFJS_TESTS }} == "False" ]]; then - pip install tensorflowjs==3.18.0 - npm install @tensorflow/tfjs - fi - if [[ ${{ env.CI_TF_VERSION }} == 2.* ]]; then - pip install onnxruntime-extensions - pip install "tensorflow-text<=$(env.CI_TF_VERSION)" - fi - - if [[ ${{ env.CI_ONNXRUNTIME_NIGHTLY }} == "true" ]]; then - pip uninstall -y onnxruntime - # install numpy upfront since it is not on https://test.pypi.org/simple/ - pip install 'numpy>=1.18' - pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly - fi + pip install onnxruntime-extensions + pip install "tensorflow-text<=$(env.CI_TF_VERSION)" pip uninstall -y tensorflow - pip install ${{ env.CI_PIP_TF_NAME }} pip uninstall -y protobuf pip install "protobuf~=3.20" python setup.py install - if [[ ${{ env.ONNX_TEST }} == "true" ]]; then - # onnx-weekly won't satisfy onnx requirement so uninstallation must happen here - pip uninstall -y onnx - pip install --index-url https://test.pypi.org/simple/ ${{ env.PIP_ONNX_NAME:-onnx }} - fi - pip freeze --all - name: Fix Paths (Windows only) From 56e3d11e2a650615e2e284f45606a0d4736fd052 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:01:01 +0000 Subject: [PATCH 023/124] Remove customized branch. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b72da11a7..1d7b32dc0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,9 +15,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - with: - repository: fatcat-z/tensorflow-onnx - ref: migrate_ci + # with: + # repository: fatcat-z/tensorflow-onnx + # ref: migrate_ci - name: Check folder run: ls ./.github/workflows/ From 28e2e666bdfe7438c7ebc19fefe7bac7ba30e63a Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:23:21 +0000 Subject: [PATCH 024/124] Add outputs and inputs. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 21 +++++++++++++-------- .github/workflows/setup.yml | 10 ++++++++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d7b32dc0..b37162ae9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,22 +9,27 @@ on: pull_request: jobs: - my-job: + prepare-variables-job: runs-on: ubuntu-latest + outputs: + tensorflow_version: + description: "The version of target tensorflow" + value: ${{ jobs.prepare-variables-job.outputs.tf_version }} steps: - name: Checkout code uses: actions/checkout@v4 - # with: - # repository: fatcat-z/tensorflow-onnx - # ref: migrate_ci - name: Check folder run: ls ./.github/workflows/ - # Call the composite action defined in my-action.yml - # - name: Run my action - # uses: ./.github/workflows/setup-common + - id: prepare-variables-job + name: Prepare Variables + run: | + echo "##[set-output name=tf_version;]2.10.0" call-setup-yml: - uses: ./.github/workflows/setup.yml \ No newline at end of file + needs: prepare-variables-job + uses: ./.github/workflows/setup.yml + with: + tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} \ No newline at end of file diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 9ba957921..750e0f5e5 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -5,6 +5,12 @@ on: branches: - main workflow_call: + inputs: + tf_version: + description: 'TensorFlow version' + required: true + default: '2.14.0' + type: string jobs: setup: @@ -21,11 +27,11 @@ jobs: pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install numpy - pip install onnxruntime-extensions - pip install "tensorflow-text<=$(env.CI_TF_VERSION)" + pip install "tensorflow-text<=${{ inputs.tf_version }}" pip uninstall -y tensorflow + pip install tensorflow==${{ inputs.tf_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" From 5c63981dbec4eaa29bf5d37adfcaa3af328624c3 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:25:00 +0000 Subject: [PATCH 025/124] Correct the mapping syntax. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b37162ae9..d721f8085 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,9 +12,7 @@ jobs: prepare-variables-job: runs-on: ubuntu-latest outputs: - tensorflow_version: - description: "The version of target tensorflow" - value: ${{ jobs.prepare-variables-job.outputs.tf_version }} + tensorflow_version: ${{ jobs.prepare-variables-job.outputs.tf_version }} steps: - name: Checkout code From f5448e994f42dc00deb4b78a7167feca2a650505 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:26:45 +0000 Subject: [PATCH 026/124] Update the steps. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d721f8085..26d30eaee 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: prepare-variables-job: runs-on: ubuntu-latest outputs: - tensorflow_version: ${{ jobs.prepare-variables-job.outputs.tf_version }} + tensorflow_version: ${{ steps.prepare-variables.outputs.tf_version }} steps: - name: Checkout code @@ -21,7 +21,7 @@ jobs: - name: Check folder run: ls ./.github/workflows/ - - id: prepare-variables-job + - id: prepare-variables name: Prepare Variables run: | echo "##[set-output name=tf_version;]2.10.0" From 4450564065e9b462a96f53357e319e78295b1e07 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:32:09 +0000 Subject: [PATCH 027/124] Set python version to 3.9. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- .github/workflows/setup.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 26d30eaee..f8d3173dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - id: prepare-variables name: Prepare Variables run: | - echo "##[set-output name=tf_version;]2.10.0" + echo "tf_version=2.10.0" >> $GITHUB_ENV call-setup-yml: needs: prepare-variables-job diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 750e0f5e5..110be443f 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -20,7 +20,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.x + python-version: 3.9 - name: Install dependencies run: | From 8d5fcb1083e2dfb1a4bce9dbc9229908aa07ce1f Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:35:48 +0000 Subject: [PATCH 028/124] Correct the output name. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f8d3173dd..27ed04977 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,4 +30,4 @@ jobs: needs: prepare-variables-job uses: ./.github/workflows/setup.yml with: - tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} \ No newline at end of file + tf_version: ${{ needs.prepare-variables.outputs.tensorflow_version }} \ No newline at end of file From 153e30f51323de0ac6258d09304d9c42a1dca8c0 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:38:14 +0000 Subject: [PATCH 029/124] Correct the output name. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 27ed04977..be631e55a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - id: prepare-variables name: Prepare Variables run: | - echo "tf_version=2.10.0" >> $GITHUB_ENV + echo "tf_version=2.10.0" >> $GITHUB_OUTPUT call-setup-yml: needs: prepare-variables-job From 271a044e2d8437ca917c3a8f99d0fe3a9e248b66 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:40:24 +0000 Subject: [PATCH 030/124] Reuse older style. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index be631e55a..0487beacf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,8 @@ jobs: - id: prepare-variables name: Prepare Variables run: | - echo "tf_version=2.10.0" >> $GITHUB_OUTPUT + # echo "tf_version=2.10.0" >> $GITHUB_OUTPUT + echo "##[set-output name=tf_version;]2.10.0" call-setup-yml: needs: prepare-variables-job From 3f252d624b9a3ada365e075c0ca8cb618054615e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:45:09 +0000 Subject: [PATCH 031/124] Update the output name. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0487beacf..e1b3e9b3b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,11 +24,11 @@ jobs: - id: prepare-variables name: Prepare Variables run: | - # echo "tf_version=2.10.0" >> $GITHUB_OUTPUT - echo "##[set-output name=tf_version;]2.10.0" + echo "tf_version=2.10.0" >> $GITHUB_OUTPUT + # echo "##[set-output name=tf_version;]2.10.0" call-setup-yml: needs: prepare-variables-job uses: ./.github/workflows/setup.yml with: - tf_version: ${{ needs.prepare-variables.outputs.tensorflow_version }} \ No newline at end of file + tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} \ No newline at end of file From f8b3446a87513f2c69781636fb07ceb31eeab1be Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 08:48:28 +0000 Subject: [PATCH 032/124] Check if setup.py exists. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e1b3e9b3b..a786ffa79 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v4 - name: Check folder - run: ls ./.github/workflows/ + run: ls ./ - id: prepare-variables name: Prepare Variables From 21ce4a197c8f24242489388e0b567b9002bdb8da Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:19:09 +0000 Subject: [PATCH 033/124] Remove comments. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a786ffa79..9d6d573d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,7 +25,6 @@ jobs: name: Prepare Variables run: | echo "tf_version=2.10.0" >> $GITHUB_OUTPUT - # echo "##[set-output name=tf_version;]2.10.0" call-setup-yml: needs: prepare-variables-job From d5e9e1a43079d3c6c0ff56b65de7d679d73c5a0d Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:21:40 +0000 Subject: [PATCH 034/124] Update the path of setup.py. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 110be443f..81a722cd3 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -35,7 +35,7 @@ jobs: pip uninstall -y protobuf pip install "protobuf~=3.20" - python setup.py install + python ./setup.py install pip freeze --all From 3bc97f3364d8ec5557ff232a45fd13be698e26a5 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:36:32 +0000 Subject: [PATCH 035/124] Check the folder. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 81a722cd3..304adcf42 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -24,7 +24,7 @@ jobs: - name: Install dependencies run: | - pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install numpy pip install onnxruntime-extensions @@ -35,7 +35,8 @@ jobs: pip uninstall -y protobuf pip install "protobuf~=3.20" - python ./setup.py install + ls *.py + python setup.py install pip freeze --all From 8afa20b5723ce857c06ae87bff64bf92165933e9 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:39:17 +0000 Subject: [PATCH 036/124] Check new folder. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 304adcf42..ea5a817a2 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -35,7 +35,7 @@ jobs: pip uninstall -y protobuf pip install "protobuf~=3.20" - ls *.py + ls python setup.py install pip freeze --all From 7840e4139d11e0fd92b12c9a053d183e985df59f Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:44:32 +0000 Subject: [PATCH 037/124] Check more folders. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index ea5a817a2..a238ef237 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -35,7 +35,8 @@ jobs: pip uninstall -y protobuf pip install "protobuf~=3.20" - ls + ls /home/runner/work/tensorflow-onnx/tensorflow-onnx/ + ls /home/runner/work/tensorflow-onnx/ python setup.py install pip freeze --all From 016b6b4ffef2e6411c20da34a2cd1021f77650ce Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 3 Jun 2024 11:47:32 +0000 Subject: [PATCH 038/124] Change the place to checkout code. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 4 ++-- .github/workflows/setup.yml | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9d6d573d6..4632ed064 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,8 +15,8 @@ jobs: tensorflow_version: ${{ steps.prepare-variables.outputs.tf_version }} steps: - - name: Checkout code - uses: actions/checkout@v4 + # - name: Checkout code + # uses: actions/checkout@v4 - name: Check folder run: ls ./ diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index a238ef237..3fc546518 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -22,6 +22,9 @@ jobs: with: python-version: 3.9 + - name: Checkout code + uses: actions/checkout@v4 + - name: Install dependencies run: | # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator From 624eee3b233d3938a23c7c128ab476e527a1b46f Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 07:22:37 +0000 Subject: [PATCH 039/124] Introduce matrix. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 17 +++++++++-------- .github/workflows/setup.yml | 9 ++++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4632ed064..798edac17 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,24 +10,25 @@ on: jobs: prepare-variables-job: + strategy: + matrix: + tf_version: ['2.10.0', '2.11.0', '2.13.0'] + python_version: ['3.8', '3.9', '3.10'] runs-on: ubuntu-latest outputs: tensorflow_version: ${{ steps.prepare-variables.outputs.tf_version }} + python_version: ${{ steps.prepare-variables.outputs.py_version }} steps: - # - name: Checkout code - # uses: actions/checkout@v4 - - - name: Check folder - run: ls ./ - - id: prepare-variables name: Prepare Variables run: | - echo "tf_version=2.10.0" >> $GITHUB_OUTPUT + echo "tf_version=${{ matrix.tf_version }}" >> $GITHUB_OUTPUT + echo "py_version=${{ matrix.python_version }}" >> $GITHUB_OUTPUT call-setup-yml: needs: prepare-variables-job uses: ./.github/workflows/setup.yml with: - tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} \ No newline at end of file + tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} + py_version: ${{ needs.prepare-variables-job.outputs.python_version }} \ No newline at end of file diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 3fc546518..6a5138b64 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -9,7 +9,10 @@ on: tf_version: description: 'TensorFlow version' required: true - default: '2.14.0' + type: string + py_version: + description: 'Python version' + required: true type: string jobs: @@ -20,9 +23,9 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.9 + python-version: ${{ inputs.py_version }} - - name: Checkout code + - name: Checkout code (${{ matrix.py_version }}-${{ matrix.tf_version }}) uses: actions/checkout@v4 - name: Install dependencies From 90edbda540c4cb8a2f464614a9993a70403fe5be Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 07:28:47 +0000 Subject: [PATCH 040/124] Move matrix to setup.yml. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- .github/workflows/setup.yml | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 798edac17..3f79502c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: push: branches: - main - pull_request: + # pull_request: jobs: prepare-variables-job: diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 6a5138b64..950184543 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -17,13 +17,19 @@ on: jobs: setup: + strategy: + matrix: + tf_version: ['2.10.0', '2.11.0', '2.13.0'] + python_version: ['3.8', '3.9', '3.10'] + runs-on: ubuntu-latest steps: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: ${{ inputs.py_version }} + # python-version: ${{ inputs.py_version }} + python-version: ${{ matrix.py_version }} - name: Checkout code (${{ matrix.py_version }}-${{ matrix.tf_version }}) uses: actions/checkout@v4 @@ -34,10 +40,12 @@ jobs: pip install numpy pip install onnxruntime-extensions - pip install "tensorflow-text<=${{ inputs.tf_version }}" + # pip install "tensorflow-text<=${{ inputs.tf_version }}" + pip install "tensorflow-text<=${{ matrix.tf_version }}" pip uninstall -y tensorflow - pip install tensorflow==${{ inputs.tf_version }} + # pip install tensorflow==${{ inputs.tf_version }} + pip install tensorflow==${{ matrix.tf_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" @@ -47,13 +55,13 @@ jobs: pip freeze --all - - name: Fix Paths (Windows only) - if: runner.os == 'Windows' - run: | - $site_dir = python -c "import site; print(site.getsitepackages()[1])" - echo "##vso[task.prependpath]$site_dir\numpy\.libs" - $base_dir = python -c "import site; print(site.getsitepackages()[0])" - echo "##vso[task.prependpath]$base_dir/Library/bin" + # - name: Fix Paths (Windows only) + # if: runner.os == 'Windows' + # run: | + # $site_dir = python -c "import site; print(site.getsitepackages()[1])" + # echo "##vso[task.prependpath]$site_dir\numpy\.libs" + # $base_dir = python -c "import site; print(site.getsitepackages()[0])" + # echo "##vso[task.prependpath]$base_dir/Library/bin" - name: Display Environment Variables run: env From aaed4814269bcd16f7dddac6e69291ed9085d4b6 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 07:29:58 +0000 Subject: [PATCH 041/124] Enable setup.yml on PR. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 950184543..8c8e946f4 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -4,6 +4,7 @@ on: push: branches: - main + pull_request: workflow_call: inputs: tf_version: From 437c27f3242edb8088ca99f6d57f43f8285f31c0 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 07:46:31 +0000 Subject: [PATCH 042/124] Change working folder. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 8c8e946f4..eeb2263c6 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -22,6 +22,9 @@ jobs: matrix: tf_version: ['2.10.0', '2.11.0', '2.13.0'] python_version: ['3.8', '3.9', '3.10'] + permissions: + actions: write + checks: write runs-on: ubuntu-latest @@ -52,6 +55,7 @@ jobs: ls /home/runner/work/tensorflow-onnx/tensorflow-onnx/ ls /home/runner/work/tensorflow-onnx/ + cd /home/runner/work/tensorflow-onnx/tensorflow-onnx/ python setup.py install pip freeze --all From a36c96b8f47a3f7723130d27bb5cfefd782506d2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 07:50:55 +0000 Subject: [PATCH 043/124] Change the trigger way. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 16 +++++++++------- .github/workflows/setup.yml | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3f79502c6..b6e67ba3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,14 +6,14 @@ on: push: branches: - main - # pull_request: + pull_request: jobs: prepare-variables-job: - strategy: - matrix: - tf_version: ['2.10.0', '2.11.0', '2.13.0'] - python_version: ['3.8', '3.9', '3.10'] + # strategy: + # matrix: + # tf_version: ['2.10.0', '2.11.0', '2.13.0'] + # python_version: ['3.8', '3.9', '3.10'] runs-on: ubuntu-latest outputs: tensorflow_version: ${{ steps.prepare-variables.outputs.tf_version }} @@ -23,8 +23,10 @@ jobs: - id: prepare-variables name: Prepare Variables run: | - echo "tf_version=${{ matrix.tf_version }}" >> $GITHUB_OUTPUT - echo "py_version=${{ matrix.python_version }}" >> $GITHUB_OUTPUT + # echo "tf_version=${{ matrix.tf_version }}" >> $GITHUB_OUTPUT + # echo "py_version=${{ matrix.python_version }}" >> $GITHUB_OUTPUT + echo "tf_version='2.10'" >> $GITHUB_OUTPUT + echo "py_version='3.8'" >> $GITHUB_OUTPUT call-setup-yml: needs: prepare-variables-job diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index eeb2263c6..edc9c9b25 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -4,7 +4,7 @@ on: push: branches: - main - pull_request: + # pull_request: workflow_call: inputs: tf_version: From 4b4ac25c017085ed028334d1178afacfb41b2d43 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 11:33:45 +0000 Subject: [PATCH 044/124] Test. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index edc9c9b25..7a777baa7 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -20,8 +20,10 @@ jobs: setup: strategy: matrix: - tf_version: ['2.10.0', '2.11.0', '2.13.0'] - python_version: ['3.8', '3.9', '3.10'] + # tf_version: ['2.10.0', '2.11.0', '2.13.0'] + # python_version: ['3.8', '3.9', '3.10'] + tf_version: ['2.10.0'] + python_version: ['3.8'] permissions: actions: write checks: write From cd8c11c6dd91ebb99d32d5587c608c55081dffea Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 11:46:02 +0000 Subject: [PATCH 045/124] Correct python version. Signed-off-by: Jay Zhang --- .github/workflows/main.yml | 2 +- .github/workflows/setup.yml | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b6e67ba3f..5b6a31914 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ on: push: branches: - main - pull_request: + # pull_request: jobs: prepare-variables-job: diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 7a777baa7..a31daa590 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -4,7 +4,7 @@ on: push: branches: - main - # pull_request: + pull_request: workflow_call: inputs: tf_version: @@ -20,10 +20,8 @@ jobs: setup: strategy: matrix: - # tf_version: ['2.10.0', '2.11.0', '2.13.0'] - # python_version: ['3.8', '3.9', '3.10'] - tf_version: ['2.10.0'] - python_version: ['3.8'] + tf_version: ['2.10.0', '2.11.0', '2.13.0'] + python_version: ['3.8', '3.9', '3.10'] permissions: actions: write checks: write @@ -35,9 +33,9 @@ jobs: uses: actions/setup-python@v2 with: # python-version: ${{ inputs.py_version }} - python-version: ${{ matrix.py_version }} + python-version: ${{ matrix.python_version }} - - name: Checkout code (${{ matrix.py_version }}-${{ matrix.tf_version }}) + - name: Checkout code (${{ matrix.python_version }}-${{ matrix.tf_version }}) uses: actions/checkout@v4 - name: Install dependencies @@ -55,9 +53,6 @@ jobs: pip uninstall -y protobuf pip install "protobuf~=3.20" - ls /home/runner/work/tensorflow-onnx/tensorflow-onnx/ - ls /home/runner/work/tensorflow-onnx/ - cd /home/runner/work/tensorflow-onnx/tensorflow-onnx/ python setup.py install pip freeze --all From 3e224f2752858168e950a469b47429e61130137e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 11:54:14 +0000 Subject: [PATCH 046/124] Correct the parameter names. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index a31daa590..57bf9771e 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -20,25 +20,22 @@ jobs: setup: strategy: matrix: - tf_version: ['2.10.0', '2.11.0', '2.13.0'] + tf_version: ['2.10', '2.11', '2.13'] python_version: ['3.8', '3.9', '3.10'] - permissions: - actions: write - checks: write runs-on: ubuntu-latest steps: - - name: Set up Python + - name: Set up Python (${{ matrix.python_version }}) uses: actions/setup-python@v2 with: # python-version: ${{ inputs.py_version }} python-version: ${{ matrix.python_version }} - - name: Checkout code (${{ matrix.python_version }}-${{ matrix.tf_version }}) + - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies + - name: Install dependencies (tf ${{ matrix.tf_version }}) run: | # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install numpy From 6c2e52f6700f4a62fd7b1cb7a2bc307901530dbf Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 12:08:02 +0000 Subject: [PATCH 047/124] Remove comments. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 57bf9771e..9b8281a88 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -37,15 +37,13 @@ jobs: - name: Install dependencies (tf ${{ matrix.tf_version }}) run: | - # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install numpy pip install onnxruntime-extensions - # pip install "tensorflow-text<=${{ inputs.tf_version }}" pip install "tensorflow-text<=${{ matrix.tf_version }}" pip uninstall -y tensorflow - # pip install tensorflow==${{ inputs.tf_version }} pip install tensorflow==${{ matrix.tf_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" @@ -54,13 +52,13 @@ jobs: pip freeze --all - # - name: Fix Paths (Windows only) - # if: runner.os == 'Windows' - # run: | - # $site_dir = python -c "import site; print(site.getsitepackages()[1])" - # echo "##vso[task.prependpath]$site_dir\numpy\.libs" - # $base_dir = python -c "import site; print(site.getsitepackages()[0])" - # echo "##vso[task.prependpath]$base_dir/Library/bin" + - name: Fix Paths (Windows only) + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" - name: Display Environment Variables run: env From 6ab219e6f24608b27d7bf2798848ab2c4dbdb2d7 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 14:41:50 +0000 Subject: [PATCH 048/124] Add pretrained_model_tests. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 9b8281a88..eefebfaaa 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -22,6 +22,7 @@ jobs: matrix: tf_version: ['2.10', '2.11', '2.13'] python_version: ['3.8', '3.9', '3.10'] + opset_version: ['17', '16', '14'] runs-on: ubuntu-latest @@ -60,5 +61,12 @@ jobs: $base_dir = python -c "import site; print(site.getsitepackages()[0])" echo "##vso[task.prependpath]$base_dir/Library/bin" - - name: Display Environment Variables - run: env + - name: Run pretrained_model_test + run: | + set -x + status=0 + # TODO: fix unity model path + # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? + python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? + exit $status + From bfa4aee2faadfd7ce0f55274cc39bd1b271795f9 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 4 Jun 2024 14:57:07 +0000 Subject: [PATCH 049/124] Install ONNX and ONNXRuntime. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index eefebfaaa..d04899df3 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -39,6 +39,8 @@ jobs: - name: Install dependencies (tf ${{ matrix.tf_version }}) run: | pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + pip install onnx + pip install onnxruntime==1.16.3 pip install numpy pip install onnxruntime-extensions From 76a8ccfe37720ed916b2f0323367cda952564898 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 03:45:57 +0000 Subject: [PATCH 050/124] Refactor workflows. Signed-off-by: Jay Zhang --- .github/workflows/preparation.yml | 49 +++++++++++++++++++++++++++++++ .github/workflows/setup.yml | 37 ++++++++++++----------- 2 files changed, 69 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/preparation.yml diff --git a/.github/workflows/preparation.yml b/.github/workflows/preparation.yml new file mode 100644 index 000000000..873600659 --- /dev/null +++ b/.github/workflows/preparation.yml @@ -0,0 +1,49 @@ +name: Prepare Environment. + +on: + workflow_call: + inputs: + tf_version: + description: 'TensorFlow version' + required: true + type: string + +jobs: + setup: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf ${{ inputs.tf_version }}) + run: | + pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + pip install onnx + pip install onnxruntime==1.16.3 + pip install numpy + + pip install onnxruntime-extensions + pip install "tensorflow-text<=${{ inputs.tf_version }}" + + pip uninstall -y tensorflow + pip install tensorflow==${{ inputs.tf_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + + python setup.py install + + pip freeze --all + + - name: Fix Paths (Windows only) + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" + + - name: List all dependencies + run: | + pip list + diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index d04899df3..44b1bbc04 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -20,15 +20,15 @@ jobs: setup: strategy: matrix: - tf_version: ['2.10', '2.11', '2.13'] - python_version: ['3.8', '3.9', '3.10'] - opset_version: ['17', '16', '14'] + tf_version: ['2.10', '2.13'] + python_version: ['3.8', '3.9'] + opset_version: ['17'] runs-on: ubuntu-latest steps: - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: # python-version: ${{ inputs.py_version }} python-version: ${{ matrix.python_version }} @@ -37,23 +37,26 @@ jobs: uses: actions/checkout@v4 - name: Install dependencies (tf ${{ matrix.tf_version }}) - run: | - pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator - pip install onnx - pip install onnxruntime==1.16.3 - pip install numpy + uses: ./.github/workflows/preparation.yml + with: + tf_version: ${{ matrix.tf_version }} + # run: | + # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator + # pip install onnx + # pip install onnxruntime==1.16.3 + # pip install numpy - pip install onnxruntime-extensions - pip install "tensorflow-text<=${{ matrix.tf_version }}" + # pip install onnxruntime-extensions + # pip install "tensorflow-text<=${{ matrix.tf_version }}" - pip uninstall -y tensorflow - pip install tensorflow==${{ matrix.tf_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" + # pip uninstall -y tensorflow + # pip install tensorflow==${{ matrix.tf_version }} + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" - python setup.py install + # python setup.py install - pip freeze --all + # pip freeze --all - name: Fix Paths (Windows only) if: runner.os == 'Windows' From 620f32b8144365f046cd9fe39bd3dc9fec254620 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 03:58:18 +0000 Subject: [PATCH 051/124] Check folder. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 44b1bbc04..77ca86fb9 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -36,6 +36,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 + - name: Check folder + run: | + ls ./.github/workflows/ + - name: Install dependencies (tf ${{ matrix.tf_version }}) uses: ./.github/workflows/preparation.yml with: From b0301c0d66c67717f64b0f73e5768e18e8d6cdca Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 04:30:09 +0000 Subject: [PATCH 052/124] Refactor actions. Signed-off-by: Jay Zhang --- .github/{workflows => actions/prepare_env}/preparation.yml | 0 .github/workflows/setup.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/{workflows => actions/prepare_env}/preparation.yml (100%) diff --git a/.github/workflows/preparation.yml b/.github/actions/prepare_env/preparation.yml similarity index 100% rename from .github/workflows/preparation.yml rename to .github/actions/prepare_env/preparation.yml diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 77ca86fb9..5589e25e2 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -41,7 +41,7 @@ jobs: ls ./.github/workflows/ - name: Install dependencies (tf ${{ matrix.tf_version }}) - uses: ./.github/workflows/preparation.yml + uses: ./.github/actions/prepare_env with: tf_version: ${{ matrix.tf_version }} # run: | From b7a66fecbc082ad642d79064e23b59ee01b1aeb6 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 04:33:10 +0000 Subject: [PATCH 053/124] Change the name of yml file. Signed-off-by: Jay Zhang --- .github/actions/prepare_env/{preparation.yml => action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/prepare_env/{preparation.yml => action.yml} (100%) diff --git a/.github/actions/prepare_env/preparation.yml b/.github/actions/prepare_env/action.yml similarity index 100% rename from .github/actions/prepare_env/preparation.yml rename to .github/actions/prepare_env/action.yml From 9f16bf5f9c1cea336670eee9873aedc227447ded Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 04:49:08 +0000 Subject: [PATCH 054/124] Update the variable. Signed-off-by: Jay Zhang --- .github/actions/prepare_env/action.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/actions/prepare_env/action.yml b/.github/actions/prepare_env/action.yml index 873600659..9d342e1a0 100644 --- a/.github/actions/prepare_env/action.yml +++ b/.github/actions/prepare_env/action.yml @@ -11,12 +11,14 @@ on: jobs: setup: runs-on: ubuntu-latest - + env: + tensorflow_version: ${{ inputs.tf_version }} steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf ${{ inputs.tf_version }}) + # - name: Install dependencies (tf ${{ inputs.tf_version }}) + - name: Install dependencies (tf $tensorflow_version) run: | pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install onnx @@ -24,10 +26,12 @@ jobs: pip install numpy pip install onnxruntime-extensions - pip install "tensorflow-text<=${{ inputs.tf_version }}" + # pip install "tensorflow-text<=${{ inputs.tf_version }}" + pip install "tensorflow-text<=$tensorflow_version" pip uninstall -y tensorflow - pip install tensorflow==${{ inputs.tf_version }} + # pip install tensorflow==${{ inputs.tf_version }} + pip install tensorflow==$tensorflow_version pip uninstall -y protobuf pip install "protobuf~=3.20" From 8fb4aa065600da0c9b34c541202cec66b710390d Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 04:50:49 +0000 Subject: [PATCH 055/124] Add 1 more trigger. Signed-off-by: Jay Zhang --- .github/actions/prepare_env/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/prepare_env/action.yml b/.github/actions/prepare_env/action.yml index 9d342e1a0..440a6fb08 100644 --- a/.github/actions/prepare_env/action.yml +++ b/.github/actions/prepare_env/action.yml @@ -1,6 +1,12 @@ name: Prepare Environment. on: + workflow_dispatch: + inputs: + tf_version: + description: 'TensorFlow version' + required: true + type: string workflow_call: inputs: tf_version: From 5f2690407bfc1541829c8e44b8cde46139b5f3aa Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 04:55:09 +0000 Subject: [PATCH 056/124] Update. Signed-off-by: Jay Zhang --- .github/actions/prepare_env/action.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/actions/prepare_env/action.yml b/.github/actions/prepare_env/action.yml index 440a6fb08..8d54be491 100644 --- a/.github/actions/prepare_env/action.yml +++ b/.github/actions/prepare_env/action.yml @@ -1,12 +1,6 @@ name: Prepare Environment. on: - workflow_dispatch: - inputs: - tf_version: - description: 'TensorFlow version' - required: true - type: string workflow_call: inputs: tf_version: @@ -18,7 +12,7 @@ jobs: setup: runs-on: ubuntu-latest env: - tensorflow_version: ${{ inputs.tf_version }} + tensorflow_version: ${{ github.event.inputs.tf_version }} steps: - name: Checkout code uses: actions/checkout@v4 From 457966cea298d76bf97b308a711455f358908c77 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 07:46:11 +0000 Subject: [PATCH 057/124] Specify the yml file name. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 5589e25e2..f15c3ecfe 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -41,7 +41,7 @@ jobs: ls ./.github/workflows/ - name: Install dependencies (tf ${{ matrix.tf_version }}) - uses: ./.github/actions/prepare_env + uses: ./.github/actions/prepare_env/action.yml with: tf_version: ${{ matrix.tf_version }} # run: | From d548cb1af1e7ecf10949f89acecec3aa854b642b Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 07:48:06 +0000 Subject: [PATCH 058/124] Try github variable. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index f15c3ecfe..886d58f99 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -23,7 +23,8 @@ jobs: tf_version: ['2.10', '2.13'] python_version: ['3.8', '3.9'] opset_version: ['17'] - + env: + tensorflow_version: ${{ github.event.inputs.tf_version }} runs-on: ubuntu-latest steps: @@ -41,7 +42,7 @@ jobs: ls ./.github/workflows/ - name: Install dependencies (tf ${{ matrix.tf_version }}) - uses: ./.github/actions/prepare_env/action.yml + uses: ./.github/actions/prepare_env/ with: tf_version: ${{ matrix.tf_version }} # run: | From 421f784fdf883e29c369224872727b1254e825cc Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 07:49:50 +0000 Subject: [PATCH 059/124] Show github. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 886d58f99..61b9fa37b 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -34,7 +34,7 @@ jobs: # python-version: ${{ inputs.py_version }} python-version: ${{ matrix.python_version }} - - name: Checkout code + - name: Checkout code ($tensorflow_version) uses: actions/checkout@v4 - name: Check folder From 8d9fbbe4debc74674460b515f7f6c314a0a8f262 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 07:52:42 +0000 Subject: [PATCH 060/124] Try it. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 61b9fa37b..d4dc9256e 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -23,8 +23,7 @@ jobs: tf_version: ['2.10', '2.13'] python_version: ['3.8', '3.9'] opset_version: ['17'] - env: - tensorflow_version: ${{ github.event.inputs.tf_version }} + runs-on: ubuntu-latest steps: @@ -34,7 +33,7 @@ jobs: # python-version: ${{ inputs.py_version }} python-version: ${{ matrix.python_version }} - - name: Checkout code ($tensorflow_version) + - name: Checkout code (${{ github.event.inputs.tf_version }}) uses: actions/checkout@v4 - name: Check folder From c9cfa46588e5660840e12f1c96f378c75b335497 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:20:23 +0000 Subject: [PATCH 061/124] Add a sh file to setup test environment. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 8 +++----- tests/setup_test_env.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 5 deletions(-) create mode 100644 tests/setup_test_env.sh diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index d4dc9256e..dcb8b3d77 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -38,13 +38,11 @@ jobs: - name: Check folder run: | - ls ./.github/workflows/ + ls ./tests/ - name: Install dependencies (tf ${{ matrix.tf_version }}) - uses: ./.github/actions/prepare_env/ - with: - tf_version: ${{ matrix.tf_version }} - # run: | + run: | + python ./tests/setup_test_env.sh ${{ matrix.tf_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 onnxruntime==1.16.3 diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh new file mode 100644 index 000000000..66362730c --- /dev/null +++ b/tests/setup_test_env.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Check if the argument is provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Assign the argument to a variable +TF_VERSION=$1 + +pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator +pip install onnx +pip install onnxruntime==1.16.3 +pip install numpy + +pip install onnxruntime-extensions +pip install "tensorflow-text<=$TF_VERSION" + +pip uninstall -y tensorflow +pip install tensorflow==$TF_VERSION +pip uninstall -y protobuf +pip install "protobuf~=3.20" + +python setup.py install + +pip freeze --all \ No newline at end of file From b0a3c43f7264caa79738eaa4bd2779fe0c1e8f1e Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:22:39 +0000 Subject: [PATCH 062/124] Update sh file. Signed-off-by: Jay Zhang --- tests/setup_test_env.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index 66362730c..a0dfce50b 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -1,10 +1,10 @@ #!/bin/bash -# Check if the argument is provided -if [ "$#" -ne 1 ]; then - echo "Usage: $0 " - exit 1 -fi +# # Check if the argument is provided +# if [ "$#" -ne 1 ]; then +# echo "Usage: $0 " +# exit 1 +# fi # Assign the argument to a variable TF_VERSION=$1 From f1db45cc8dbfc81e3cabb6c28965d8fd1e3c7eac Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:29:52 +0000 Subject: [PATCH 063/124] Correct the way to call sh file. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index dcb8b3d77..6ed3b327d 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -41,8 +41,9 @@ jobs: ls ./tests/ - name: Install dependencies (tf ${{ matrix.tf_version }}) + shell: bash run: | - python ./tests/setup_test_env.sh ${{ matrix.tf_version }} + ./tests/setup_test_env.sh ${{ matrix.tf_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 onnxruntime==1.16.3 From 14dbd959c8b02181d9835d2f31d9ac0ab5b117cb Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:36:14 +0000 Subject: [PATCH 064/124] Set the permission. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 6ed3b327d..c6aebaf68 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -43,6 +43,7 @@ jobs: - name: Install dependencies (tf ${{ matrix.tf_version }}) shell: bash run: | + chmod +x ./tests/setup_test_env.sh ./tests/setup_test_env.sh ${{ matrix.tf_version }} # pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator # pip install onnx From 17f397cdcb902a3b2ed6b5af283da2d0bdc525d0 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:40:32 +0000 Subject: [PATCH 065/124] Check packages. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index c6aebaf68..589011be5 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -74,6 +74,7 @@ jobs: run: | set -x status=0 + pip list # TODO: fix unity model path # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? From 8a5dcab5248c14e1841438e1c07f4316425ee7a0 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 08:59:50 +0000 Subject: [PATCH 066/124] Check variable value. Signed-off-by: Jay Zhang --- tests/setup_test_env.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index a0dfce50b..7dcfd2b66 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -9,6 +9,8 @@ # Assign the argument to a variable TF_VERSION=$1 +echo "=============== TensorFlow version: $TF_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 onnxruntime==1.16.3 From 5722cf2d74dfcec9bdb5a9f72a799a03bc18a67a Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 09:22:49 +0000 Subject: [PATCH 067/124] Settle down the final files. Signed-off-by: Jay Zhang --- .github/workflows/setup.yml | 1 - tests/setup_test_env.sh | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 589011be5..c6aebaf68 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -74,7 +74,6 @@ jobs: run: | set -x status=0 - pip list # TODO: fix unity model path # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index 7dcfd2b66..739b962fd 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -1,15 +1,15 @@ #!/bin/bash # # Check if the argument is provided -# if [ "$#" -ne 1 ]; then -# echo "Usage: $0 " -# exit 1 -# fi +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi # Assign the argument to a variable TF_VERSION=$1 -echo "=============== TensorFlow version: $TF_VERSION" +echo "==== TensorFlow version: $TF_VERSION" pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator pip install onnx From b8306a4ea618a9126d26d22a9757ffcdb3129ef5 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 09:59:16 +0000 Subject: [PATCH 068/124] Refactor. Signed-off-by: Jay Zhang --- ...up.yml => pretrained_model_tests_core.yml} | 33 ++----------------- tests/setup_test_env.sh | 7 ++-- 2 files changed, 8 insertions(+), 32 deletions(-) rename .github/workflows/{setup.yml => pretrained_model_tests_core.yml} (61%) diff --git a/.github/workflows/setup.yml b/.github/workflows/pretrained_model_tests_core.yml similarity index 61% rename from .github/workflows/setup.yml rename to .github/workflows/pretrained_model_tests_core.yml index c6aebaf68..0fd1b68b5 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -1,28 +1,18 @@ -name: setup-common +name: Pretrained Model Test (Core) on: push: branches: - main pull_request: - workflow_call: - inputs: - tf_version: - description: 'TensorFlow version' - required: true - type: string - py_version: - description: 'Python version' - required: true - type: string jobs: setup: strategy: matrix: tf_version: ['2.10', '2.13'] - python_version: ['3.8', '3.9'] - opset_version: ['17'] + python_version: ['3.8', '3.10'] + opset_version: ['17', '16', '14'] runs-on: ubuntu-latest @@ -30,7 +20,6 @@ jobs: - name: Set up Python (${{ matrix.python_version }}) uses: actions/setup-python@v5 with: - # python-version: ${{ inputs.py_version }} python-version: ${{ matrix.python_version }} - name: Checkout code (${{ github.event.inputs.tf_version }}) @@ -45,22 +34,6 @@ jobs: run: | chmod +x ./tests/setup_test_env.sh ./tests/setup_test_env.sh ${{ matrix.tf_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 onnxruntime==1.16.3 - # pip install numpy - - # pip install onnxruntime-extensions - # pip install "tensorflow-text<=${{ matrix.tf_version }}" - - # pip uninstall -y tensorflow - # pip install tensorflow==${{ matrix.tf_version }} - # pip uninstall -y protobuf - # pip install "protobuf~=3.20" - - # python setup.py install - - # pip freeze --all - name: Fix Paths (Windows only) if: runner.os == 'Windows' diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh index 739b962fd..7f02ab7e0 100644 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -1,19 +1,22 @@ #!/bin/bash # # Check if the argument is provided -if [ "$#" -ne 1 ]; then +if [ "$#" -ne 2 ]; then echo "Usage: $0 " + echo "Usage: $1 " exit 1 fi # Assign the argument to a variable TF_VERSION=$1 +ORT_VERSION=$2 echo "==== TensorFlow version: $TF_VERSION" +echo "==== ONNXRuntime version: $ORT_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 onnxruntime==1.16.3 +pip install onnxruntime==$ORT_VERSION pip install numpy pip install onnxruntime-extensions From 5cfccdb235cd0730902f50060a0a3171ba787860 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 10:03:53 +0000 Subject: [PATCH 069/124] Correct the format. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 3 ++- tests/setup_test_env.sh | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100644 => 100755 tests/setup_test_env.sh diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 0fd1b68b5..9085d60eb 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -13,6 +13,7 @@ jobs: tf_version: ['2.10', '2.13'] python_version: ['3.8', '3.10'] opset_version: ['17', '16', '14'] + ort_version: ['1.16.3'] runs-on: ubuntu-latest @@ -33,7 +34,7 @@ jobs: shell: bash run: | chmod +x ./tests/setup_test_env.sh - ./tests/setup_test_env.sh ${{ matrix.tf_version }} + ./tests/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} - name: Fix Paths (Windows only) if: runner.os == 'Windows' diff --git a/tests/setup_test_env.sh b/tests/setup_test_env.sh old mode 100644 new mode 100755 index 7f02ab7e0..9887aca85 --- a/tests/setup_test_env.sh +++ b/tests/setup_test_env.sh @@ -2,8 +2,7 @@ # # Check if the argument is provided if [ "$#" -ne 2 ]; then - echo "Usage: $0 " - echo "Usage: $1 " + echo "Usage: $0 " exit 1 fi From 7bd657c61593944f79d7f9f0f025ac5db7ebb541 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 23:27:09 +0800 Subject: [PATCH 070/124] Prepare final job. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 9085d60eb..2c5c98d60 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -10,9 +10,9 @@ jobs: setup: strategy: matrix: - tf_version: ['2.10', '2.13'] - python_version: ['3.8', '3.10'] - opset_version: ['17', '16', '14'] + tf_version: ['2.9.0', '2.15.0'] + python_version: ['3.8', '3.9', '3.10'] + opset_version: ['18', '15'] ort_version: ['1.16.3'] runs-on: ubuntu-latest @@ -23,14 +23,10 @@ jobs: with: python-version: ${{ matrix.python_version }} - - name: Checkout code (${{ github.event.inputs.tf_version }}) + - name: Checkout code uses: actions/checkout@v4 - - name: Check folder - run: | - ls ./tests/ - - - name: Install dependencies (tf ${{ matrix.tf_version }}) + - name: Install dependencies (tf v${{ matrix.tf_version }}) shell: bash run: | chmod +x ./tests/setup_test_env.sh From bd5f1ae75bc64a2f20092bc42ac8075948cf58f1 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 23:27:41 +0800 Subject: [PATCH 071/124] This will only be triggered by a PR. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 2c5c98d60..f142429f8 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -1,9 +1,6 @@ name: Pretrained Model Test (Core) on: - push: - branches: - - main pull_request: jobs: From 3e2a2e9f280623087327812d6dffefb039408edd Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 23:30:24 +0800 Subject: [PATCH 072/124] Add on push back. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index f142429f8..1af8652ff 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -2,6 +2,9 @@ name: Pretrained Model Test (Core) on: pull_request: + push: + branches: + - main jobs: setup: From 0467444f16a5095f6b1b88bc4afc120a6aec28b2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 23:45:06 +0800 Subject: [PATCH 073/124] Add unit test workflow. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_core.yml | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/unit_tests_core.yml diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml new file mode 100644 index 000000000..616a449a9 --- /dev/null +++ b/.github/workflows/unit_tests_core.yml @@ -0,0 +1,54 @@ +name: Unit Tests (Core) + +on: + pull_request: + push: + branches: + - main + +jobs: + setup: + strategy: + matrix: + tf_version: ['2.9.0', '2.15.0'] + python_version: ['3.8', '3.9', '3.10'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + + runs-on: ubuntu-latest + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + chmod +x ./tests/setup_test_env.sh + ./tests/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} + + - name: Fix Paths (Windows only) + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" + + - name: Run unit_test + run: | + set -x + status=0 + export TF2ONNX_TEST_BACKEND=onnxruntime + export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} + export TF2ONNX_SKIP_TFLITE_TESTS=False + 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 + exit $status + From 5c2edd1719122f1bd1c1be5c1a690886bad51f27 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Wed, 5 Jun 2024 23:51:20 +0800 Subject: [PATCH 074/124] Lower the highest tf version to be tested. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 4 ++-- .github/workflows/unit_tests_core.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 1af8652ff..2a88c918c 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -7,10 +7,10 @@ on: - main jobs: - setup: + run_tests: strategy: matrix: - tf_version: ['2.9.0', '2.15.0'] + tf_version: ['2.9.0', '2.13.0'] python_version: ['3.8', '3.9', '3.10'] opset_version: ['18', '15'] ort_version: ['1.16.3'] diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 616a449a9..a232292df 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -7,10 +7,10 @@ on: - main jobs: - setup: + run_tests: strategy: matrix: - tf_version: ['2.9.0', '2.15.0'] + tf_version: ['2.9.0', '2.13.0'] python_version: ['3.8', '3.9', '3.10'] opset_version: ['18', '15'] ort_version: ['1.16.3'] From ece9a227dd767f63b3bbec9d387030cab693e5d1 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 18:14:56 +0800 Subject: [PATCH 075/124] Add keras_application_tests core. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 76 +++++++++++++++++++ .../workflows/pretrained_model_tests_core.yml | 2 +- .github/workflows/pylint.yml | 2 +- .github/workflows/unit_test_matrix.yml | 76 ------------------- .github/workflows/unit_tests_core.yml | 2 +- tests/{ => utils}/setup_test_env.sh | 0 6 files changed, 79 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/keras_application_test_core.yml delete mode 100644 .github/workflows/unit_test_matrix.yml rename tests/{ => utils}/setup_test_env.sh (100%) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml new file mode 100644 index 000000000..add1a2b25 --- /dev/null +++ b/.github/workflows/keras_application_test_core.yml @@ -0,0 +1,76 @@ +name: Keras2Onnx Application Tests (Core) + +on: + pull_request: + push: + branches: + - main + +jobs: + run_tests: + strategy: + matrix: + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + onnx_version: ['1.15.0'] + + runs-on: ubuntu-latest + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + # conda config --set always_yes yes --set changeps1 no + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install onnxruntime==${{ matrix.ort_version }} + pip install Pillow==8.2.0 + pip install opencv-python + pip install tqdm + pip install keras-segmentation==0.2.0 + git clone https://github.com/matterport/Mask_RCNN + cd Mask_RCNN + pip install -r requirements.txt + python setup.py install + cd .. + pip install matplotlib + git clone https://github.com/qqwweee/keras-yolo3 + pip install keras-resnet + pip install git+https://www.github.com/keras-team/keras-contrib.git + pip install keras-tcn==2.8.3 + pip install git+https://github.com/qubvel/efficientnet + pip install transformers==4.2.0 + pip install keras-self-attention + pip install pytest pytest-cov pytest-runner + + pip freeze --all + + - name: Run keras application tests + run: | + set -x + status=0 + pip install -e . + python -c "import onnxruntime" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + cd tests/keras2onnx_applications/nightly_build + python run_all_v2.py + exit $status + diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 2a88c918c..c0f1bcf06 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -30,7 +30,7 @@ jobs: shell: bash run: | chmod +x ./tests/setup_test_env.sh - ./tests/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} + ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} - name: Fix Paths (Windows only) if: runner.os == 'Windows' diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 0852e2f54..c2edb2d57 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -16,7 +16,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.8 # Specify the desired Python version (e.g., 3.8, 3.9) + python-version: 3.9 # Specify the desired Python version (e.g., 3.8, 3.9) - name: Install dependencies run: pip install pylint==2.4.4 diff --git a/.github/workflows/unit_test_matrix.yml b/.github/workflows/unit_test_matrix.yml deleted file mode 100644 index 1c63dae6d..000000000 --- a/.github/workflows/unit_test_matrix.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Unit Tests - -on: - push: - branches: - - main - -jobs: - unit_tests: - runs-on: ${{ matrix.platform }} - strategy: - matrix: - python_version: ${{ matrix.python_versions }} - tf_version: ${{ matrix.tf_versions }} - onnx_opset: ${{ matrix.onnx_opsets }} - include: - - python_versions: ['3.8'] - tf_versions: ['2.9.0'] - onnx_opsets: ['17', '16', '14'] - platforms: ['linux', 'windows'] - - python_versions: ['3.9'] - tf_versions: ['2.15.0'] - onnx_opsets: ['17', '16', '14'] - platforms: ['linux', 'windows'] - - python_versions: ['3.7'] - tf_versions: ['1.15.5'] - onnx_opsets: ['18', '17', '16', '15'] - platforms: ['windows'] - - python_versions: ['3.7'] - tf_versions: ['1.15.5'] - onnx_opsets: ['18', '17', '16'] - platforms: ['linux'] - - python_versions: ['3.10'] - tf_versions: ['2.14.0'] - platforms: ['linux', 'windows'] - - python_versions: ['3.9'] - tf_versions: ['2.12.0'] - platforms: ['linux', 'windows'] - - python_versions: ['3.8'] - tf_versions: ['2.10.0', '2.11.0'] - platforms: ['linux', 'windows'] - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python_version }} - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Run unit tests - run: pytest tests/ - - - name: Generate coverage report - if: ${{ matrix.report_coverage == 'True' }} - run: coverage report - - # Add other steps as needed for your specific use case - - combine_coverage: - runs-on: ubuntu-latest - needs: unit_tests - steps: - - name: Combine coverage reports - run: coverage combine - - name: Upload coverage report - uses: actions/upload-artifact@v2 - with: - name: coverage-report - path: .coverage - -# Add other workflows or jobs as necessary diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index a232292df..7844ebcbe 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -30,7 +30,7 @@ jobs: shell: bash run: | chmod +x ./tests/setup_test_env.sh - ./tests/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} + ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} - name: Fix Paths (Windows only) if: runner.os == 'Windows' diff --git a/tests/setup_test_env.sh b/tests/utils/setup_test_env.sh similarity index 100% rename from tests/setup_test_env.sh rename to tests/utils/setup_test_env.sh From f6a8fc74b0b61ac02dd0b72f52cbfdbe6e6766e2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 18:21:58 +0800 Subject: [PATCH 076/124] Correct the path. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_core.yml | 2 +- .github/workflows/unit_tests_core.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index c0f1bcf06..95e7b9c39 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies (tf v${{ matrix.tf_version }}) shell: bash run: | - chmod +x ./tests/setup_test_env.sh + chmod +x ./tests/utils/setup_test_env.sh ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} - name: Fix Paths (Windows only) diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 7844ebcbe..7de3a7c46 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -29,7 +29,7 @@ jobs: - name: Install dependencies (tf v${{ matrix.tf_version }}) shell: bash run: | - chmod +x ./tests/setup_test_env.sh + chmod +x ./tests/utils/setup_test_env.sh ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} - name: Fix Paths (Windows only) From 727fba08a675ccee5f3e5f1098fcb33b67bc7fa2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 19:12:05 +0800 Subject: [PATCH 077/124] Add keras unit tests. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 7 ++- .github/workflows/keras_unit_test_core.yml | 61 +++++++++++++++++++ .../workflows/pretrained_model_tests_core.yml | 2 + .github/workflows/pylint.yml | 4 +- .github/workflows/unit_tests_core.yml | 2 + tests/utils/setup_test_env.sh | 1 + 6 files changed, 74 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/keras_unit_test_core.yml diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index add1a2b25..eca2599fa 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -1,13 +1,15 @@ -name: Keras2Onnx Application Tests (Core) +name: Keras2onnx Application Tests (Core) on: pull_request: + branches: + - main push: branches: - main jobs: - run_tests: + run_tests_linux: strategy: matrix: tf_version: ['2.9.0', '2.13.0'] @@ -61,6 +63,7 @@ jobs: pip install keras-self-attention pip install pytest pytest-cov pytest-runner + echo "----- List all of depdencies:" pip freeze --all - name: Run keras application tests diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml new file mode 100644 index 000000000..154fdee90 --- /dev/null +++ b/.github/workflows/keras_unit_test_core.yml @@ -0,0 +1,61 @@ +name: Keras2onnx Unit Tests (Core) + +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + run_tests_linux: + strategy: + matrix: + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9', '3.10'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + onnx_version: ['1.15.0'] + + runs-on: ubuntu-latest + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install -r requirements.txt + pip install -r requirements-dev.txt + pip install pytest pytest-cov pytest-runner + pip install onnxruntime==${{ matrix.ort_version }} + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras unit tests + run: | + set -x + status=0 + python -c "import onnxruntime" + python -c "import onnxconverter_common" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + exit $status + diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 95e7b9c39..9b7e27c53 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -2,6 +2,8 @@ name: Pretrained Model Test (Core) on: pull_request: + branches: + - main push: branches: - main diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index c2edb2d57..8e6d09c64 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,10 +1,12 @@ name: Pylint Workflow on: + pull_request: + branches: + - main push: branches: - main - pull_request: jobs: pylint: diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 7de3a7c46..d83e794cd 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -2,6 +2,8 @@ name: Unit Tests (Core) on: pull_request: + branches: + - main push: branches: - main diff --git a/tests/utils/setup_test_env.sh b/tests/utils/setup_test_env.sh index 9887aca85..004f2505b 100755 --- a/tests/utils/setup_test_env.sh +++ b/tests/utils/setup_test_env.sh @@ -28,4 +28,5 @@ pip install "protobuf~=3.20" python setup.py install +echo "----- List all of depdencies:" pip freeze --all \ No newline at end of file From 9ad022d06f83fbbffcc26d5dee152fa6191feea8 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 19:29:27 +0800 Subject: [PATCH 078/124] Remove unused files. Signed-off-by: Jay Zhang --- .github/workflows/keras_unit_test_core.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 154fdee90..f1a3acb5e 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -42,8 +42,6 @@ jobs: pip install timeout-decorator pip install coloredlogs flatbuffers pip install tensorflow==${{ matrix.tf_version }} - pip install -r requirements.txt - pip install -r requirements-dev.txt pip install pytest pytest-cov pytest-runner pip install onnxruntime==${{ matrix.ort_version }} From 428c79dc182940dd3aecbe481f9a62aff4ac5897 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 21:02:31 +0800 Subject: [PATCH 079/124] Settle down protobuf version. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_core.yml | 1 - .github/workflows/keras_unit_test_core.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index eca2599fa..0658b4faa 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -33,7 +33,6 @@ jobs: shell: bash run: | python -m pip install --upgrade pip - # conda config --set always_yes yes --set changeps1 no pip install onnxconverter-common pip install onnx==${{ matrix.onnx_version }} pip uninstall -y protobuf diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index f1a3acb5e..4a9522da5 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -35,8 +35,6 @@ jobs: python -m pip install --upgrade pip pip install onnxconverter-common pip install onnx==${{ matrix.onnx_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" pip install h5py==3.7.0 pip install parameterized pip install timeout-decorator @@ -44,6 +42,8 @@ jobs: pip install tensorflow==${{ matrix.tf_version }} pip install pytest pytest-cov pytest-runner pip install onnxruntime==${{ matrix.ort_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" echo "----- List all of depdencies:" pip freeze --all From e8e7c0047b2ff67e398fe29d1f76436d552aa7d7 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 21:09:26 +0800 Subject: [PATCH 080/124] Install tf2onnx. Signed-off-by: Jay Zhang --- .github/workflows/keras_unit_test_core.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 4a9522da5..a5dacf6d2 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -44,6 +44,7 @@ jobs: pip install onnxruntime==${{ matrix.ort_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" + pip install -e . echo "----- List all of depdencies:" pip freeze --all From 4dd9251ff95c43091b108651dee9c4c10c7bc487 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 22:29:52 +0800 Subject: [PATCH 081/124] Add keras unit tests on windows. Signed-off-by: Jay Zhang --- .github/workflows/keras_unit_test_core.yml | 149 +++++++++++++++++++++ .github/workflows/main.yml | 36 ----- 2 files changed, 149 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index a5dacf6d2..6bfabecff 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -58,3 +58,152 @@ jobs: pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml exit $status + run_tests_windows: + strategy: + matrix: + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9', '3.10'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + onnx_version: ['1.15.0'] + + runs-on: windows-2022 + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install pytest pytest-cov pytest-runner + pip install onnxruntime==${{ matrix.ort_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras unit tests + run: | + set -x + status=0 + python -c "import onnxruntime" + python -c "import onnxconverter_common" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + exit $status + + + run_tests_linux_TF_15: + strategy: + matrix: + tf_version: ['1.15.0'] + python_version: ['3.7'] # Max version that supports tf 1.15 + opset_version: ['18', '15'] + ort_version: ['1.14.1'] # Max version that supports python 3.7 + onnx_version: ['1.14.1'] # Max version that supports python 3.7 + + runs-on: ubuntu-latest + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install pytest pytest-cov pytest-runner + pip install onnxruntime==${{ matrix.ort_version }} + pip install numpy==1.19.0 + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras unit tests + run: | + set -x + status=0 + python -c "import onnxruntime" + python -c "import onnxconverter_common" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + exit $status + + run_tests_windows_TF_15: + strategy: + matrix: + tf_version: ['1.15.0'] + python_version: ['3.7'] # Max version that supports tf 1.15 + opset_version: ['18', '15'] + ort_version: ['1.14.1'] # Max version that supports python 3.7 + onnx_version: ['1.14.1'] # Max version that supports python 3.7 + + runs-on: windows-2022 + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (tf v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install pytest pytest-cov pytest-runner + pip install onnxruntime==${{ matrix.ort_version }} + pip install numpy==1.19.0 + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras unit tests + run: | + set -x + status=0 + python -c "import onnxruntime" + python -c "import onnxconverter_common" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + exit $status diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 5b6a31914..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,36 +0,0 @@ -# .github/workflows/main.yml - -name: Main Workflow - -on: - push: - branches: - - main - # pull_request: - -jobs: - prepare-variables-job: - # strategy: - # matrix: - # tf_version: ['2.10.0', '2.11.0', '2.13.0'] - # python_version: ['3.8', '3.9', '3.10'] - runs-on: ubuntu-latest - outputs: - tensorflow_version: ${{ steps.prepare-variables.outputs.tf_version }} - python_version: ${{ steps.prepare-variables.outputs.py_version }} - - steps: - - id: prepare-variables - name: Prepare Variables - run: | - # echo "tf_version=${{ matrix.tf_version }}" >> $GITHUB_OUTPUT - # echo "py_version=${{ matrix.python_version }}" >> $GITHUB_OUTPUT - echo "tf_version='2.10'" >> $GITHUB_OUTPUT - echo "py_version='3.8'" >> $GITHUB_OUTPUT - - call-setup-yml: - needs: prepare-variables-job - uses: ./.github/workflows/setup.yml - with: - tf_version: ${{ needs.prepare-variables-job.outputs.tensorflow_version }} - py_version: ${{ needs.prepare-variables-job.outputs.python_version }} \ No newline at end of file From 8f48ae88d54faa987bcdcf86dee002f791bbf3e7 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 22:51:57 +0800 Subject: [PATCH 082/124] Enable more windows tests. Signed-off-by: Jay Zhang --- .github/workflows/keras_unit_test_core.yml | 103 ++++++++++----------- .github/workflows/unit_tests_core.yml | 5 +- 2 files changed, 51 insertions(+), 57 deletions(-) diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 6bfabecff..a03b57d06 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -9,54 +9,54 @@ on: - main jobs: - run_tests_linux: - strategy: - matrix: - tf_version: ['2.9.0', '2.13.0'] - python_version: ['3.8', '3.9', '3.10'] - opset_version: ['18', '15'] - ort_version: ['1.16.3'] - onnx_version: ['1.15.0'] - - runs-on: ubuntu-latest - - steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies (tf v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install pytest pytest-cov pytest-runner - pip install onnxruntime==${{ matrix.ort_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install -e . - - echo "----- List all of depdencies:" - pip freeze --all - - - name: Run keras unit tests - run: | - set -x - status=0 - python -c "import onnxruntime" - python -c "import onnxconverter_common" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - exit $status + # run_tests_linux: + # strategy: + # matrix: + # tf_version: ['2.9.0', '2.13.0'] + # python_version: ['3.8', '3.9', '3.10'] + # opset_version: ['18', '15'] + # ort_version: ['1.16.3'] + # onnx_version: ['1.15.0'] + + # runs-on: ubuntu-latest + + # steps: + # - name: Set up Python (${{ matrix.python_version }}) + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python_version }} + + # - name: Checkout code + # uses: actions/checkout@v4 + + # - name: Install dependencies (tf v${{ matrix.tf_version }}) + # shell: bash + # run: | + # python -m pip install --upgrade pip + # pip install onnxconverter-common + # pip install onnx==${{ matrix.onnx_version }} + # pip install h5py==3.7.0 + # pip install parameterized + # pip install timeout-decorator + # pip install coloredlogs flatbuffers + # pip install tensorflow==${{ matrix.tf_version }} + # pip install pytest pytest-cov pytest-runner + # pip install onnxruntime==${{ matrix.ort_version }} + # pip uninstall -y protobuf + # pip install "protobuf~=3.20" + # pip install -e . + + # echo "----- List all of depdencies:" + # pip freeze --all + + # - name: Run keras unit tests + # run: | + # set -x + # status=0 + # python -c "import onnxruntime" + # python -c "import onnxconverter_common" + # pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + # exit $status run_tests_windows: strategy: @@ -100,13 +100,9 @@ jobs: - name: Run keras unit tests run: | - set -x - status=0 python -c "import onnxruntime" python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - exit $status - run_tests_linux_TF_15: strategy: @@ -201,9 +197,6 @@ jobs: - name: Run keras unit tests run: | - set -x - status=0 python -c "import onnxruntime" python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - exit $status diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index d83e794cd..047bccebf 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -16,8 +16,9 @@ jobs: python_version: ['3.8', '3.9', '3.10'] opset_version: ['18', '15'] ort_version: ['1.16.3'] + os: ['ubuntu-latest', 'windows-2022'] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -28,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf v${{ matrix.tf_version }}) + - name: Install dependencies (tf-v${{ matrix.tf_version }}) shell: bash run: | chmod +x ./tests/utils/setup_test_env.sh From 3daec4d462c8df332952d5d74d3ed567a1ddb7cf Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 22:57:50 +0800 Subject: [PATCH 083/124] Correct windows script. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_core.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 047bccebf..84b9cd6d6 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -45,13 +45,10 @@ jobs: - name: Run unit_test run: | - set -x - status=0 export TF2ONNX_TEST_BACKEND=onnxruntime export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} export TF2ONNX_SKIP_TFLITE_TESTS=False 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 - exit $status From 0fc5f41e2ae90d3d9866ad3aca2be5637dcf4d40 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 23:11:52 +0800 Subject: [PATCH 084/124] Correct windows tests. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_core.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 84b9cd6d6..99685cd29 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -43,7 +43,8 @@ jobs: $base_dir = python -c "import site; print(site.getsitepackages()[0])" echo "##vso[task.prependpath]$base_dir/Library/bin" - - name: Run unit_test + - name: Run unit_test (Linux) + if: runner.os == 'Linux' run: | export TF2ONNX_TEST_BACKEND=onnxruntime export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} @@ -52,3 +53,12 @@ jobs: export TF2ONNX_SKIP_TF_TESTS=False python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append + - name: Run unit_test (Windows) + if: runner.os == 'Windows' + run: | + %TF2ONNX_TEST_BACKEND%=onnxruntime + %TF2ONNX_TEST_OPSET%=${{ matrix.opset_version }} + %TF2ONNX_SKIP_TFLITE_TESTS%=False + %TF2ONNX_SKIP_TFJS_TESTS%=True + %TF2ONNX_SKIP_TF_TESTS%=False + python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append From ec60eded99111c13da7a9fea8ec67bf53d5c08ae Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 6 Jun 2024 23:27:38 +0800 Subject: [PATCH 085/124] Correct the environment variables in windows. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_core.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 99685cd29..f38e154ad 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -56,9 +56,9 @@ jobs: - name: Run unit_test (Windows) if: runner.os == 'Windows' run: | - %TF2ONNX_TEST_BACKEND%=onnxruntime - %TF2ONNX_TEST_OPSET%=${{ matrix.opset_version }} - %TF2ONNX_SKIP_TFLITE_TESTS%=False - %TF2ONNX_SKIP_TFJS_TESTS%=True - %TF2ONNX_SKIP_TF_TESTS%=False + set TF2ONNX_TEST_BACKEND=onnxruntime + set TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} + set TF2ONNX_SKIP_TFLITE_TESTS=False + 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 From 83219cb885a90a816838da52a96a792d0c235c16 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 7 Jun 2024 00:25:50 +0800 Subject: [PATCH 086/124] Add more windows tests, and publish test results. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 122 ++++++++++++++- .github/workflows/keras_unit_test_core.yml | 141 +++++------------- .../workflows/pretrained_model_tests_core.yml | 23 ++- .github/workflows/unit_tests_core.yml | 21 ++- 4 files changed, 194 insertions(+), 113 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index 0658b4faa..ae75e9f69 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -9,7 +9,7 @@ on: - main jobs: - run_tests_linux: + run_tests: strategy: matrix: tf_version: ['2.9.0', '2.13.0'] @@ -17,8 +17,9 @@ jobs: opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.15.0'] + os: ['ubuntu-latest', 'windows-2022'] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -29,7 +30,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf v${{ matrix.tf_version }}) + - name: Install dependencies (TF-v${{ matrix.tf_version }}) shell: bash run: | python -m pip install --upgrade pip @@ -62,17 +63,122 @@ jobs: pip install keras-self-attention pip install pytest pytest-cov pytest-runner + pip install -e . + echo "----- List all of depdencies:" pip freeze --all - - name: Run keras application tests + - name: Run keras application tests (${{ matrix.os }}) run: | - set -x - status=0 - pip install -e . python -c "import onnxruntime" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml cd tests/keras2onnx_applications/nightly_build python run_all_v2.py - exit $status + run_tests_tf_15: + strategy: + matrix: + tf_version: ['1.15.0'] + python_version: ['3.7'] # Max version that supports tf 1.15 + opset_version: ['18', '15'] + ort_version: ['1.14.1'] # Max version that supports python 3.7 + onnx_version: ['1.14.1'] # Max version that supports python 3.7 + os: ['ubuntu-latest', 'windows-2022'] + + runs-on: ${{ matrix.os }} + + steps: + - name: Set up Python (${{ matrix.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python_version }} + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install dependencies (TF-v${{ matrix.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ matrix.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ matrix.tf_version }} + pip install keras==2.3.1 + pip install onnxruntime==${{ matrix.ort_version }} + pip install Pillow==8.2.0 + pip install opencv-python + pip install tqdm + pip install keras-segmentation==0.2.0 + git clone https://github.com/matterport/Mask_RCNN + cd Mask_RCNN + pip install -r requirements.txt + python setup.py install + cd .. + pip install matplotlib + git clone https://github.com/qqwweee/keras-yolo3 + pip install keras-resnet + pip install git+https://www.github.com/keras-team/keras-contrib.git + pip install keras-tcn==2.8.3 + pip install git+https://github.com/qubvel/efficientnet + pip install transformers==4.2.0 + pip install keras-self-attention + pip install pytest pytest-cov pytest-runner + pip install numpy==1.19.0 + pip install h5py==2.9.0 + + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras application tests (${{ matrix.os }}) + run: | + python -c "import onnxruntime" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + cd tests/keras2onnx_applications/nightly_build + python run_all_v2.py --exclude "test_keras_applications_v2.py" + + + publish-test-results: + name: "Publish Tests Results to Github" + needs: run_tests + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" + + publish-test-results-tf-15: + name: "Publish Tests Results(TF15) to Github" + needs: run_tests_tf_15 + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index a03b57d06..fac48650d 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -9,56 +9,7 @@ on: - main jobs: - # run_tests_linux: - # strategy: - # matrix: - # tf_version: ['2.9.0', '2.13.0'] - # python_version: ['3.8', '3.9', '3.10'] - # opset_version: ['18', '15'] - # ort_version: ['1.16.3'] - # onnx_version: ['1.15.0'] - - # runs-on: ubuntu-latest - - # steps: - # - name: Set up Python (${{ matrix.python_version }}) - # uses: actions/setup-python@v5 - # with: - # python-version: ${{ matrix.python_version }} - - # - name: Checkout code - # uses: actions/checkout@v4 - - # - name: Install dependencies (tf v${{ matrix.tf_version }}) - # shell: bash - # run: | - # python -m pip install --upgrade pip - # pip install onnxconverter-common - # pip install onnx==${{ matrix.onnx_version }} - # pip install h5py==3.7.0 - # pip install parameterized - # pip install timeout-decorator - # pip install coloredlogs flatbuffers - # pip install tensorflow==${{ matrix.tf_version }} - # pip install pytest pytest-cov pytest-runner - # pip install onnxruntime==${{ matrix.ort_version }} - # pip uninstall -y protobuf - # pip install "protobuf~=3.20" - # pip install -e . - - # echo "----- List all of depdencies:" - # pip freeze --all - - # - name: Run keras unit tests - # run: | - # set -x - # status=0 - # python -c "import onnxruntime" - # python -c "import onnxconverter_common" - # pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - # exit $status - - run_tests_windows: + run_tests: strategy: matrix: tf_version: ['2.9.0', '2.13.0'] @@ -66,8 +17,9 @@ jobs: opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.15.0'] + os: ['ubuntu-latest', 'windows-2022'] - runs-on: windows-2022 + runs-on: ${{ matrix.os }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -78,7 +30,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf v${{ matrix.tf_version }}) + - name: Install dependencies (TF-v${{ matrix.tf_version }}) shell: bash run: | python -m pip install --upgrade pip @@ -98,13 +50,13 @@ jobs: echo "----- List all of depdencies:" pip freeze --all - - name: Run keras unit tests + - name: Run keras unit tests (${{ matrix.os }}) run: | python -c "import onnxruntime" python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - run_tests_linux_TF_15: + run_tests_tf_15: strategy: matrix: tf_version: ['1.15.0'] @@ -112,8 +64,9 @@ jobs: opset_version: ['18', '15'] ort_version: ['1.14.1'] # Max version that supports python 3.7 onnx_version: ['1.14.1'] # Max version that supports python 3.7 + os: ['ubuntu-latest', 'windows-2022'] - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -145,58 +98,46 @@ jobs: echo "----- List all of depdencies:" pip freeze --all - - name: Run keras unit tests + - name: Run keras unit tests (${{ matrix.os }}) run: | - set -x - status=0 python -c "import onnxruntime" python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - exit $status - - run_tests_windows_TF_15: - strategy: - matrix: - tf_version: ['1.15.0'] - python_version: ['3.7'] # Max version that supports tf 1.15 - opset_version: ['18', '15'] - ort_version: ['1.14.1'] # Max version that supports python 3.7 - onnx_version: ['1.14.1'] # Max version that supports python 3.7 - - runs-on: windows-2022 + publish-test-results: + name: "Publish Tests Results to Github" + needs: run_tests + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 + - name: Download Artifacts + uses: actions/download-artifact@v3 with: - python-version: ${{ matrix.python_version }} - - - name: Checkout code - uses: actions/checkout@v4 + path: artifacts - - name: Install dependencies (tf v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install pytest pytest-cov pytest-runner - pip install onnxruntime==${{ matrix.ort_version }} - pip install numpy==1.19.0 - pip install -e . + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" - echo "----- List all of depdencies:" - pip freeze --all + publish-test-results-tf-15: + name: "Publish Tests Results(TF15) to Github" + needs: run_tests_tf_15 + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts - - name: Run keras unit tests - run: | - python -c "import onnxruntime" - python -c "import onnxconverter_common" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 9b7e27c53..beb446f38 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -28,7 +28,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf v${{ matrix.tf_version }}) + - name: Install dependencies (TF-v${{ matrix.tf_version }}) shell: bash run: | chmod +x ./tests/utils/setup_test_env.sh @@ -44,10 +44,25 @@ jobs: - name: Run pretrained_model_test run: | - set -x - status=0 # TODO: fix unity model path # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? - exit $status + publish-test-results: + name: "Publish Tests Results to Github" + needs: run_tests + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index f38e154ad..454da5cab 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -29,7 +29,7 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf-v${{ matrix.tf_version }}) + - name: Install dependencies (TF-v${{ matrix.tf_version }}) shell: bash run: | chmod +x ./tests/utils/setup_test_env.sh @@ -62,3 +62,22 @@ jobs: 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 + + publish-test-results: + name: "Publish Tests Results to Github" + needs: run_tests + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" \ No newline at end of file From a7205d530d52f36e7f45edc6d88fe9a0e4417bf2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 7 Jun 2024 14:00:22 +0800 Subject: [PATCH 087/124] Make sure correct results were pusblished. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 14 ++------ .github/workflows/keras_unit_test_core.yml | 14 ++------ .../workflows/pretrained_model_tests_core.yml | 35 ++++++++++--------- .github/workflows/unit_tests_core.yml | 9 ++--- 4 files changed, 25 insertions(+), 47 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index ae75e9f69..2d1161e70 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -154,15 +154,10 @@ jobs: pull-requests: write if: always() steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "artifacts/**/*.xml" + files: "junit/test-results.xml" publish-test-results-tf-15: name: "Publish Tests Results(TF15) to Github" @@ -173,12 +168,7 @@ jobs: pull-requests: write if: always() steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "artifacts/**/*.xml" \ No newline at end of file + files: "junit/test-results.xml" \ No newline at end of file diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index fac48650d..65ac6b28b 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -113,15 +113,10 @@ jobs: pull-requests: write if: always() steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "artifacts/**/*.xml" + files: "junit/test-results.xml" publish-test-results-tf-15: name: "Publish Tests Results(TF15) to Github" @@ -132,12 +127,7 @@ jobs: pull-requests: write if: always() steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "artifacts/**/*.xml" \ No newline at end of file + files: "junit/test-results.xml" \ No newline at end of file diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index beb446f38..3321da0f6 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -47,22 +47,23 @@ jobs: # TODO: fix unity model path # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? + ls *.xml - publish-test-results: - name: "Publish Tests Results to Github" - needs: run_tests - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: write - if: always() - steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts + # publish-test-results: + # name: "Publish Tests Results to Github" + # needs: run_tests + # runs-on: ubuntu-latest + # permissions: + # checks: write + # pull-requests: write + # if: always() + # steps: + # - name: Download Artifacts + # uses: actions/download-artifact@v3 + # with: + # path: artifacts - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "artifacts/**/*.xml" \ No newline at end of file + # - name: Publish Test Results + # uses: EnricoMi/publish-unit-test-result-action@v2 + # with: + # files: "**/pytest*.xml" \ No newline at end of file diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 454da5cab..21791fb1a 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -52,6 +52,7 @@ jobs: 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 + ls - name: Run unit_test (Windows) if: runner.os == 'Windows' @@ -62,6 +63,7 @@ jobs: 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 + ls publish-test-results: name: "Publish Tests Results to Github" @@ -72,12 +74,7 @@ jobs: pull-requests: write if: always() steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "artifacts/**/*.xml" \ No newline at end of file + files: "**/test-results.xml" \ No newline at end of file From c33663d445c7aa1c2d9f16774d36ece2062191b6 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 7 Jun 2024 14:33:18 +0800 Subject: [PATCH 088/124] Change the test result files path. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_core.yml | 7 +++++++ .github/workflows/keras_unit_test_core.yml | 8 ++++++++ .github/workflows/unit_tests_core.yml | 10 +++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index 2d1161e70..e5b6ce7ce 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -144,6 +144,13 @@ jobs: cd tests/keras2onnx_applications/nightly_build python run_all_v2.py --exclude "test_keras_applications_v2.py" + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + path: pytest.xml + publish-test-results: name: "Publish Tests Results to Github" diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 65ac6b28b..ab2d38266 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -104,6 +104,14 @@ jobs: python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + path: pytest.xml + + publish-test-results: name: "Publish Tests Results to Github" needs: run_tests diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 21791fb1a..3bf4cb704 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -65,6 +65,14 @@ jobs: python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append ls + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + path: pytest.xml + + publish-test-results: name: "Publish Tests Results to Github" needs: run_tests @@ -77,4 +85,4 @@ jobs: - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "**/test-results.xml" \ No newline at end of file + files: "artifacts/**/*.xml" \ No newline at end of file From 870f22f66f52bab356d8e2068b17944f6a84d439 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 7 Jun 2024 19:09:27 +0800 Subject: [PATCH 089/124] Check how to download test results. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 33 +++++++++++++++---- .github/workflows/keras_unit_test_core.yml | 33 +++++++++++++++---- .../workflows/pretrained_model_tests_core.yml | 2 +- .github/workflows/unit_tests_core.yml | 20 +++++++---- 4 files changed, 67 insertions(+), 21 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index e5b6ce7ce..24d91485c 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -12,9 +12,12 @@ jobs: run_tests: strategy: matrix: - tf_version: ['2.9.0', '2.13.0'] - python_version: ['3.8', '3.9'] - opset_version: ['18', '15'] + # tf_version: ['2.9.0', '2.13.0'] + # python_version: ['3.8', '3.9'] + # opset_version: ['18', '15'] + tf_version: ['2.9.0'] + python_version: ['3.9'] + opset_version: ['18'] ort_version: ['1.16.3'] onnx_version: ['1.15.0'] os: ['ubuntu-latest', 'windows-2022'] @@ -75,6 +78,13 @@ jobs: cd tests/keras2onnx_applications/nightly_build python run_all_v2.py + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + path: ./**/test-results*.xml + run_tests_tf_15: strategy: matrix: @@ -149,8 +159,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: pytest.xml - + path: ./**/test-results*.xml publish-test-results: name: "Publish Tests Results to Github" @@ -161,10 +170,15 @@ jobs: pull-requests: write if: always() steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "junit/test-results.xml" + files: "artifacts/**/*.xml" publish-test-results-tf-15: name: "Publish Tests Results(TF15) to Github" @@ -175,7 +189,12 @@ jobs: pull-requests: write if: always() steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "junit/test-results.xml" \ No newline at end of file + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index ab2d38266..12d1ddf28 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -12,10 +12,12 @@ jobs: run_tests: strategy: matrix: - tf_version: ['2.9.0', '2.13.0'] - python_version: ['3.8', '3.9', '3.10'] - opset_version: ['18', '15'] - ort_version: ['1.16.3'] + # tf_version: ['2.9.0', '2.13.0'] + # python_version: ['3.8', '3.9'] + # opset_version: ['18', '15'] + tf_version: ['2.9.0'] + python_version: ['3.9'] + opset_version: ['18'] ort_version: ['1.16.3'] onnx_version: ['1.15.0'] os: ['ubuntu-latest', 'windows-2022'] @@ -56,6 +58,13 @@ jobs: python -c "import onnxconverter_common" pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + path: ./**/test-results*.xml + run_tests_tf_15: strategy: matrix: @@ -109,7 +118,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: pytest.xml + path: ./**/test-results*.xml publish-test-results: @@ -121,10 +130,15 @@ jobs: pull-requests: write if: always() steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "junit/test-results.xml" + files: "artifacts/**/*.xml" publish-test-results-tf-15: name: "Publish Tests Results(TF15) to Github" @@ -135,7 +149,12 @@ jobs: pull-requests: write if: always() steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: - files: "junit/test-results.xml" \ No newline at end of file + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 3321da0f6..4610eaa5b 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -47,7 +47,7 @@ jobs: # TODO: fix unity model path # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? - ls *.xml + ls # publish-test-results: # name: "Publish Tests Results to Github" diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 3bf4cb704..8cb01af5d 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -12,9 +12,12 @@ jobs: run_tests: strategy: matrix: - tf_version: ['2.9.0', '2.13.0'] - python_version: ['3.8', '3.9', '3.10'] - opset_version: ['18', '15'] + # tf_version: ['2.9.0', '2.13.0'] + # python_version: ['3.8', '3.9'] + # opset_version: ['18', '15'] + tf_version: ['2.9.0'] + python_version: ['3.9'] + opset_version: ['18'] ort_version: ['1.16.3'] os: ['ubuntu-latest', 'windows-2022'] @@ -51,7 +54,7 @@ jobs: export TF2ONNX_SKIP_TFLITE_TESTS=False 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 + python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml ls - name: Run unit_test (Windows) @@ -62,7 +65,7 @@ jobs: set TF2ONNX_SKIP_TFLITE_TESTS=False 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 + python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append --junitxml=junit/test-results.xml ls - name: Upload Test Results @@ -70,7 +73,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: pytest.xml + path: ./**/test-results-*.xml publish-test-results: @@ -82,6 +85,11 @@ jobs: pull-requests: write if: always() steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 with: From 1773e3fd2c2cccca5fea2079210b31ded6101857 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 7 Jun 2024 20:31:35 +0800 Subject: [PATCH 090/124] Finalize the workflow actions. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_core.yml | 12 +++++------- .github/workflows/keras_unit_test_core.yml | 13 ++++++------- .github/workflows/pretrained_model_tests_core.yml | 3 ++- .github/workflows/unit_tests_core.yml | 13 +++++-------- 4 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index 24d91485c..d35ece74f 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -1,4 +1,4 @@ -name: Keras2onnx Application Tests (Core) +name: Keras2onnx Application Tests (CI) on: pull_request: @@ -7,17 +7,15 @@ on: push: branches: - main + workflow_dispatch: jobs: run_tests: strategy: matrix: - # tf_version: ['2.9.0', '2.13.0'] - # python_version: ['3.8', '3.9'] - # opset_version: ['18', '15'] - tf_version: ['2.9.0'] - python_version: ['3.9'] - opset_version: ['18'] + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9'] + opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.15.0'] os: ['ubuntu-latest', 'windows-2022'] diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 12d1ddf28..3894ca166 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -1,4 +1,4 @@ -name: Keras2onnx Unit Tests (Core) +name: Keras2onnx Unit Tests (CI) on: pull_request: @@ -7,17 +7,16 @@ on: push: branches: - main + workflow_dispatch: jobs: run_tests: strategy: matrix: - # tf_version: ['2.9.0', '2.13.0'] - # python_version: ['3.8', '3.9'] - # opset_version: ['18', '15'] - tf_version: ['2.9.0'] - python_version: ['3.9'] - opset_version: ['18'] ort_version: ['1.16.3'] + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] onnx_version: ['1.15.0'] os: ['ubuntu-latest', 'windows-2022'] diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 4610eaa5b..0df68887f 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -1,4 +1,4 @@ -name: Pretrained Model Test (Core) +name: Pretrained Model Test (CI) on: pull_request: @@ -7,6 +7,7 @@ on: push: branches: - main + workflow_dispatch: jobs: run_tests: diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 8cb01af5d..d95a77504 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -1,4 +1,4 @@ -name: Unit Tests (Core) +name: Unit Tests (CI) on: pull_request: @@ -7,17 +7,15 @@ on: push: branches: - main + workflow_dispatch: jobs: run_tests: strategy: matrix: - # tf_version: ['2.9.0', '2.13.0'] - # python_version: ['3.8', '3.9'] - # opset_version: ['18', '15'] - tf_version: ['2.9.0'] - python_version: ['3.9'] - opset_version: ['18'] + tf_version: ['2.9.0', '2.13.0'] + python_version: ['3.8', '3.9'] + opset_version: ['18', '15'] ort_version: ['1.16.3'] os: ['ubuntu-latest', 'windows-2022'] @@ -75,7 +73,6 @@ jobs: name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) path: ./**/test-results-*.xml - publish-test-results: name: "Publish Tests Results to Github" needs: run_tests From f233bb10ad5c1ab86982e652bd4cd5ac1a068f9c Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Tue, 11 Jun 2024 11:22:07 +0800 Subject: [PATCH 091/124] Remove azure pipelines. Signed-off-by: Jay Zhang --- deleted_ci_build/azure_pipelines/coveragerc | 3 - .../keras2onnx_application_tests.yml | 134 ------------------ .../azure_pipelines/keras2onnx_unit_test.yml | 106 -------------- .../onnxruntime_nightly_test.yml | 59 -------- .../pretrained_model_test-matrix.yml | 92 ------------ .../azure_pipelines/pretrained_model_test.yml | 44 ------ deleted_ci_build/azure_pipelines/pylint.yml | 15 -- .../templates/combine_test_coverage.yml | 46 ------ .../templates/job_generator.yml | 106 -------------- .../keras2onnx_application_tests.yml | 128 ----------------- .../templates/keras2onnx_unit_test.yml | 97 ------------- .../templates/pretrained_model_test.yml | 11 -- .../azure_pipelines/templates/setup.yml | 62 -------- .../azure_pipelines/templates/unit_test.yml | 28 ---- .../trimmed_keras2onnx_application_tests.yml | 75 ---------- .../trimmed_keras2onnx_unit_test.yml | 102 ------------- .../azure_pipelines/unit_test-matrix.yml | 98 ------------- .../azure_pipelines/unit_test.yml | 100 ------------- 18 files changed, 1306 deletions(-) delete mode 100644 deleted_ci_build/azure_pipelines/coveragerc delete mode 100644 deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml delete mode 100644 deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml delete mode 100755 deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml delete mode 100644 deleted_ci_build/azure_pipelines/pretrained_model_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/pylint.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/job_generator.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/setup.yml delete mode 100644 deleted_ci_build/azure_pipelines/templates/unit_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml delete mode 100644 deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml delete mode 100644 deleted_ci_build/azure_pipelines/unit_test-matrix.yml delete mode 100644 deleted_ci_build/azure_pipelines/unit_test.yml diff --git a/deleted_ci_build/azure_pipelines/coveragerc b/deleted_ci_build/azure_pipelines/coveragerc deleted file mode 100644 index 4646e272c..000000000 --- a/deleted_ci_build/azure_pipelines/coveragerc +++ /dev/null @@ -1,3 +0,0 @@ -[paths] -source = - ./ diff --git a/deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml deleted file mode 100644 index 400fdc395..000000000 --- a/deleted_ci_build/azure_pipelines/keras2onnx_application_tests.yml +++ /dev/null @@ -1,134 +0,0 @@ -# Nightly keras2onnx application tests - -jobs: - -- job: 'Linux' - timeoutInMinutes: 180 - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - Python310-tf2-2.13: - python.version: '3.10' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.13.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==3.4.0 - INSTALL_NUMPY: pip install numpy==1.19.0 - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python39-tf2-2.12: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.12.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==3.4.0 - INSTALL_NUMPY: pip install numpy==1.19.0 - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python310-tf2-2.11: - python.version: '3.10' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.11.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==3.4.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python39-tf2-2.10: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.12.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - steps: - - template: 'templates/keras2onnx_application_tests.yml' - parameters: - platform: 'linux' - -- job: 'Win' - timeoutInMinutes: 180 - pool: - vmImage: 'windows-2019' - strategy: - matrix: - Python37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - INSTALL_KERAS: pip install keras==2.3.1 - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: - INSTALL_NUMPY: pip install numpy==1.19.0 - INSTALL_LEGACY: pip install h5py==2.9.0 - NIGHTLY_BUILD_TEST: python run_all_v2.py --exclude "test_keras_applications_v2.py" - - Python39-tf2-2.15: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.15.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.2.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python39-tf2-2.11: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.11.0 - INSTALL_ORT: pip install onnxruntime==1.15.1 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==3.4.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python38-tf2-2.10: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.15.1 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.12.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python38-tf2-2.9: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.9.0 - INSTALL_ORT: pip install onnxruntime==1.15.1 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.12.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - steps: - - template: 'templates/keras2onnx_application_tests.yml' - parameters: - platform: 'windows' diff --git a/deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml deleted file mode 100644 index 47adaf412..000000000 --- a/deleted_ci_build/azure_pipelines/keras2onnx_unit_test.yml +++ /dev/null @@ -1,106 +0,0 @@ -# Nightly keras2onnx unit tests - -jobs: - -- job: 'Linux' - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - ############ TF Keras Unit Tests ############ - Python310-tf2-2.13: - python.version: '3.10' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.13.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python39-tf2-2.12: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.12.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python39-tf2-2.11: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.11.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python38-tf2-2.10: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - ############ Pure Keras Unit Tests ############ - Keras-Py37-tf1.15.0: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - KERAS: keras==2.4.3 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - steps: - - template: 'templates/keras2onnx_unit_test.yml' - parameters: - platform: 'linux' - -- job: 'Win' - pool: - vmImage: 'windows-2019' - strategy: - matrix: - ############ TF Keras Unit Tests ############ - Python310-tf2-2.14: - python.version: '3.10' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.14.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python39-tf2-2.13: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.13.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python38-tf2-2.12: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.12.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python39-tf2-2.11: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.11.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - Python38-tf2-2.10: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.15.0 - INSTALL_NUMPY: - - ############ Pure Keras Unit Tests ############ - Keras-Py37-tf1.15.0: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - KERAS: keras==2.4.3 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - steps: - - template: 'templates/keras2onnx_unit_test.yml' - parameters: - platform: 'windows' diff --git a/deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml b/deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml deleted file mode 100644 index 8a184ec50..000000000 --- a/deleted_ci_build/azure_pipelines/onnxruntime_nightly_test.yml +++ /dev/null @@ -1,59 +0,0 @@ -# Test against latest onnxruntime nightly package - -stages: - - stage: - jobs: - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: [3.7'] - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_backends: {onnxruntime: ['nightly']} - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.8'] - tf_versions: ['2.9.0', '2.10.0'] - onnx_backends: {onnxruntime: ['nightly']} - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.9'] - tf_versions: ['2.11.0', '2.12.0'] - onnx_backends: {onnxruntime: ['nightly']} - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.10'] - tf_versions: ['2.13.0', '2.15.0'] - onnx_backends: {onnxruntime: ['nightly']} - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/combine_test_coverage.yml' - -schedules: -- cron: "0 12 */3 * *" - displayName: Every 3 days onnxruntime nightly unittest - branches: - include: - - main - always: true diff --git a/deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml b/deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml deleted file mode 100755 index f297a3e3c..000000000 --- a/deleted_ci_build/azure_pipelines/pretrained_model_test-matrix.yml +++ /dev/null @@ -1,92 +0,0 @@ -# Pre-trained model test, full matrix - -jobs: - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['windows'] - python_versions: ['3.7'] # Max version that supports tf 1.15 - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['18', '17', '16', '15', '14'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.7'] # Max version that supports tf 1.15 - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['18', '17', '16', '14'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['windows'] - python_versions: ['3.9'] - tf_versions: ['2.9.0', '2.15.0'] - onnx_opsets: ['18', '17', '16', '15'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.8'] - tf_versions: ['2.9.0'] - onnx_opsets: ['17', '16', '14'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.10'] - tf_versions: ['2.15.0'] - onnx_opsets: ['17', '16', '14'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.8'] - tf_versions: ['2.10.0'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.9'] - tf_versions: ['2.11.0', '2.12.0'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.10'] - tf_versions: ['2.14.0'] - job: - steps: - - template: 'pretrained_model_test.yml' - -schedules: -- cron: "0 11 */3 * *" - displayName: pre-trained model test, full matrix, run every 3 days - branches: - include: - - main - always: true diff --git a/deleted_ci_build/azure_pipelines/pretrained_model_test.yml b/deleted_ci_build/azure_pipelines/pretrained_model_test.yml deleted file mode 100644 index a5b757daa..000000000 --- a/deleted_ci_build/azure_pipelines/pretrained_model_test.yml +++ /dev/null @@ -1,44 +0,0 @@ -# Pre-trained model test - -jobs: -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.7'] # Max version that supports tf 1.15 - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['15'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.8'] - tf_versions: ['2.9.0'] - onnx_opsets: ['18', '15'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.9'] - tf_versions: ['2.15.0'] - onnx_opsets: ['18', '15'] - job: - steps: - - template: 'pretrained_model_test.yml' - -- template: 'templates/job_generator.yml' - parameters: - platforms: ['linux'] - python_versions: ['3.10'] - tf_versions: ['2.9.0', '2.15.0'] - onnx_opsets: ['18', '15'] - job: - steps: - - template: 'pretrained_model_test.yml' \ No newline at end of file diff --git a/deleted_ci_build/azure_pipelines/pylint.yml b/deleted_ci_build/azure_pipelines/pylint.yml deleted file mode 100644 index 1f13e0c8b..000000000 --- a/deleted_ci_build/azure_pipelines/pylint.yml +++ /dev/null @@ -1,15 +0,0 @@ -# Pylint - -jobs: -- template: 'templates/job_generator.yml' - parameters: - onnx_opsets: [''] - job: - steps: - - bash: | - set -ex - pip install pylint==2.4.4 - pip freeze - pylint --rcfile=tools/pylintrc --ignore=version.py,tflite --disable=cyclic-import tf2onnx tests/*.py tools -j 0 - displayName: 'Pylint' - diff --git a/deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml b/deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml deleted file mode 100644 index 53d573abf..000000000 --- a/deleted_ci_build/azure_pipelines/templates/combine_test_coverage.yml +++ /dev/null @@ -1,46 +0,0 @@ -# combine and report unittest coverage - -parameters: - artifact_name: 'single_test_coverage' - -stages: -- stage: - jobs: - - job: 'combine_and_report_coverage' - variables: - CI_ARTIFACT_NAME: '${{ parameters.artifact_name }}' - - pool: - vmImage: 'ubuntu-latest' - - steps: - - task: DownloadBuildArtifacts@0 - displayName: 'Download Single Test Coverage' - inputs: - artifactName: '${{ parameters.artifact_name }}' - downloadPath: $(System.DefaultWorkingDirectory) - - - task: UsePythonVersion@0 - inputs: - versionSpec: '3.7' - architecture: 'x64' - - - bash: | - pip install -U coverage - condition: succeeded() - displayName: 'Install Coverage' - - - bash: | - cat ${CI_ARTIFACT_NAME}/.coveragerc_paths* >> ci_build/azure_pipelines/coveragerc - coverage combine --rcfile ci_build/azure_pipelines/coveragerc ${CI_ARTIFACT_NAME} - coverage report - coverage html -d ${BUILD_ARTIFACTSTAGINGDIRECTORY}/coverage_report - condition: succeeded() - displayName: 'Combine And Report Test Coverage' - - - task: PublishBuildArtifacts@1 - condition: succeeded() - inputs: - pathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: 'test_coverage_report' - displayName: 'Deploy Test Coverage Report' diff --git a/deleted_ci_build/azure_pipelines/templates/job_generator.yml b/deleted_ci_build/azure_pipelines/templates/job_generator.yml deleted file mode 100644 index 826ff03c6..000000000 --- a/deleted_ci_build/azure_pipelines/templates/job_generator.yml +++ /dev/null @@ -1,106 +0,0 @@ -# This template generates multiple jobs based on input parameters - -parameters: - platforms: ['linux'] - python_versions: ['3.8'] - tf_versions: [''] - onnx_versions: ['1.15.0'] - onnx_opsets: ['18', '17', '16', '15', '14'] - onnx_backends: {onnxruntime: ['1.16.3']} - job: {} - run_setup: 'True' - report_coverage: 'False' - artifact_name: 'single_test_coverage' - skip_tflite_tests: 'True' - skip_tfjs_tests: 'True' - skip_tf_tests: 'False' - -jobs: - - job: ${{ parameters.job.name }} - timeoutInMinutes: 100 - pool: - vmImage: $(CI_VM_IMAGE) - - # Generate matrix - strategy: - matrix: - ${{ each platform in parameters.platforms }}: - ${{ each python_version in parameters.python_versions }}: - ${{ each tf_version in parameters.tf_versions }}: - ${{ each onnx_version in parameters.onnx_versions }}: - ${{ each onnx_backend in parameters.onnx_backends }}: - ${{ each onnx_backend_version in onnx_backend.value }}: - ${{ each onnx_opset in parameters.onnx_opsets }}: - ${{ format('{0} python{1}{2}{3} tf{4} onnx{5} {6}{7}{8}', platform, python_version, replace(replace(parameters.skip_tflite_tests,'True', ''), 'False', ' tflite'), replace(replace(parameters.skip_tfjs_tests,'True', ''), 'False', ' tfjs'), tf_version, onnx_version, replace(format('opset{0} ', onnx_opset), 'opset ', ''), onnx_backend.key, onnx_backend_version) }}: - ${{ if eq(platform, 'linux') }}: - CI_VM_IMAGE: 'ubuntu-latest' - ${{ if eq(platform, 'windows') }}: - CI_VM_IMAGE: 'windows-2019' - ${{ if eq(platform, 'mac') }}: - CI_VM_IMAGE: 'macOS-11' - CI_PLATFORM: '${{ platform }}' - CI_PYTHON_VERSION: '${{ python_version }}' - CI_TF_VERSION: '${{ tf_version }}' - CI_ONNX_VERSION: '${{ onnx_version }}' - ${{ if ne(onnx_opset, '') }}: - CI_ONNX_OPSET: '${{ onnx_opset }}' - CI_ONNX_BACKEND: '${{ onnx_backend.key }}' - CI_ONNX_BACKEND_VERSION: '${{ onnx_backend_version }}' - CI_SKIP_TF_TESTS: '${{ parameters.skip_tf_tests }}' - CI_SKIP_TFLITE_TESTS: '${{ parameters.skip_tflite_tests }}' - CI_SKIP_TFJS_TESTS: '${{ parameters.skip_tfjs_tests }}' - - ${{ if eq(tf_version, '') }}: - CI_PIP_TF_NAME: 'tensorflow' - ${{ if ne(tf_version, '') }}: - CI_PIP_TF_NAME: ${{ format('tensorflow=={0}', tf_version) }} - - ${{ if eq(onnx_version, '') }}: - CI_PIP_ONNX_NAME: 'onnx' - ${{ if ne(onnx_version, '') }}: - CI_PIP_ONNX_NAME: ${{ format('onnx=={0}', onnx_version) }} - - ${{ if eq(onnx_backend_version, '') }}: - CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}' - ${{ if ne(onnx_backend_version, '') }}: - ${{ if ne(onnx_backend_version, 'nightly') }}: - CI_PIP_ONNX_BACKEND_NAME: ${{ format('{0}=={1}', onnx_backend.key, onnx_backend_version) }} - ${{ if eq(onnx_backend_version, 'nightly') }}: - CI_PIP_ONNX_BACKEND_NAME: '${{ onnx_backend.key }}' - CI_ONNXRUNTIME_NIGHTLY: 'true' - - # Insert all properties other than pool/steps/strategy - ${{ each pair in parameters.job }}: - ${{ if not(in(pair.key, 'pool', 'steps', 'strategy')) }}: - ${{ pair.key }}: ${{ pair.value }} - - steps: - - bash: env - displayName: 'Display Environment Variables' - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(CI_PYTHON_VERSION)' - architecture: 'x64' - - - ${{ if eq(parameters.run_setup, 'True') }}: - - template: 'setup.yml' - - # Insert original steps - - ${{ parameters.job.steps }} - - # Report and publish test coverage - # Save source path for combining coverage cross platform - - bash: | - coverage report - mv .coverage ${BUILD_ARTIFACTSTAGINGDIRECTORY}/.coverage.${CI_PLATFORM}_python${CI_PYTHON_VERSION}_tf${CI_TF_VERSION}_onnx${CI_ONNX_VERSION}_${CI_ONNX_BACKEND}${CI_ONNX_VERSION} - echo " ${SYSTEM_DEFAULTWORKINGDIRECTORY}" > ${BUILD_ARTIFACTSTAGINGDIRECTORY}/.coveragerc_paths.${CI_PLATFORM}_python${CI_PYTHON_VERSION}_tf${CI_TF_VERSION}_onnx${CI_ONNX_VERSION}_${CI_ONNX_BACKEND}${CI_ONNX_VERSION} - condition: and(succeededOrFailed(), eq(${{ parameters.report_coverage }}, 'True')) - displayName: 'Report Single Test Coverage' - - - task: PublishBuildArtifacts@1 - condition: succeeded() - inputs: - pathtoPublish: '$(Build.ArtifactStagingDirectory)' - artifactName: '${{ parameters.artifact_name }}' - displayName: 'Deploy Single Test Coverage' diff --git a/deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml deleted file mode 100644 index 2c4a54e7c..000000000 --- a/deleted_ci_build/azure_pipelines/templates/keras2onnx_application_tests.yml +++ /dev/null @@ -1,128 +0,0 @@ -# Run applications tests from keras2onnx - -parameters: - platform: 'linux' - - -steps: -- ${{ if eq(parameters.platform, 'linux') }}: - - script: sudo install -d -m 0777 /home/vsts/.conda/envs - displayName: Fix Conda permissions - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - - script: | - python -m pip install --upgrade pip - conda config --set always_yes yes --set changeps1 no - pip install onnxconverter-common - pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - $(INSTALL_TENSORFLOW) - $(INSTALL_KERAS) - $(INSTALL_ORT) - pip install Pillow==8.2.0 - pip install opencv-python - pip install tqdm - pip install keras-segmentation==0.2.0 - git clone https://github.com/matterport/Mask_RCNN - cd Mask_RCNN - pip install -r requirements.txt - python setup.py install - cd .. - pip install matplotlib - git clone https://github.com/qqwweee/keras-yolo3 - $(INSTALL_KERAS_RESNET) - pip install git+https://www.github.com/keras-team/keras-contrib.git - pip install keras-tcn==2.8.3 - $(UNINSTALL_KERAS) - pip install git+https://github.com/qubvel/efficientnet - $(INSTALL_TRANSFORMERS) - pip install keras-self-attention - pip install pytest pytest-cov pytest-runner - $(INSTALL_NUMPY) - if [[ ! -z $INSTALL_LEGACY ]]; - then - pip install $(INSTALL_LEGACY) - fi - - pip freeze --all - displayName: 'Install dependencies' - - - script: | - pip install -e . - python -c "import onnxruntime" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - cd tests/keras2onnx_applications/nightly_build - $(NIGHTLY_BUILD_TEST) - displayName: 'pytest' - - - task: PublishTestResults@2 - inputs: - testResultsFiles: '**/test-results-*.xml' - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() - -- ${{ if eq(parameters.platform, 'windows') }}: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: Add conda to PATH - - - script: | - python -m pip install --upgrade pip numpy - echo Test numpy installation... && python -c "import numpy" - pip install onnxconverter-common - pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - %INSTALL_TENSORFLOW% - %INSTALL_KERAS% - %INSTALL_ORT% - pip install Pillow==8.2.0 - pip install opencv-python - pip install tqdm - pip install keras-segmentation==0.2.0 - pip install matplotlib - git clone https://github.com/qqwweee/keras-yolo3 - %INSTALL_KERAS_RESNET% - pip install git+https://www.github.com/keras-team/keras-contrib.git - pip install keras-tcn==2.8.3 - %UNINSTALL_KERAS% - pip install git+https://github.com/qubvel/efficientnet - %INSTALL_TRANSFORMERS% - pip install keras-self-attention - pip install pytest pytest-cov pytest-runner - %INSTALL_NUMPY% - IF NOT "%INSTALL_LEGACY%"=="" (pip install %INSTALL_LEGACY%) - - pip freeze --all - displayName: 'Install dependencies' - - - script: | - pip install -e . - echo Test onnxruntime installation... && python -c "import onnxruntime" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - cd tests/keras2onnx_applications/nightly_build - %NIGHTLY_BUILD_TEST% - displayName: 'pytest' - - - task: PublishTestResults@2 - inputs: - testResultsFiles: '**/test-results-*.xml' - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() diff --git a/deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml deleted file mode 100644 index adb436f0a..000000000 --- a/deleted_ci_build/azure_pipelines/templates/keras2onnx_unit_test.yml +++ /dev/null @@ -1,97 +0,0 @@ -# Run unit tests from keras2onnx - -parameters: - platform: 'linux' - - -steps: -- ${{ if eq(parameters.platform, 'linux') }}: - - script: sudo install -d -m 0777 /home/vsts/.conda/envs - displayName: Fix Conda permissions - - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - - script: | - python -m pip install --upgrade pip - conda config --set always_yes yes --set changeps1 no - pip install onnxconverter-common - pip install $(ONNX_PATH) - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install $(TENSORFLOW_PATH) - if [[ ! -z $KERAS ]]; - then - pip install $(KERAS) - fi - pip install -r requirements.txt - pip install -r requirements-dev.txt - pip install pytest pytest-cov pytest-runner - $(INSTALL_ORT) - $(INSTALL_NUMPY) - - pip freeze --all - displayName: 'Install dependencies' - - - script: | - pip install -e . - python -c "import onnxruntime" - python -c "import onnxconverter_common" - if [[ ! -z $KERAS ]]; - then - export TF_KERAS=0 - fi - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - displayName: 'pytest' - - - task: PublishTestResults@2 - inputs: - testResultsFiles: '**/test-results.xml' - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() - -- ${{ if eq(parameters.platform, 'windows') }}: - - task: UsePythonVersion@0 - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - - script: | - python -m pip install --upgrade pip numpy - echo Test numpy installation... && python -c "import numpy" - pip install onnxconverter-common - pip install %ONNX_PATH% - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install %TENSORFLOW_PATH% - IF NOT "%KERAS%"=="" (pip install %KERAS%) - pip install pytest pytest-cov pytest-runner - %INSTALL_ORT% - %INSTALL_NUMPY% - - pip freeze --all - displayName: 'Install dependencies' - - - script: | - pip install -e . - echo Test onnxruntime installation... && python -c "import onnxruntime" - python -c "import onnxconverter_common" - IF NOT "%KERAS%"=="" (set TF_KERAS=0) - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - displayName: 'pytest' - - - task: PublishTestResults@2 - inputs: - testResultsFiles: '**/test-results.xml' - testRunTitle: 'Python $(python.version)' - condition: succeededOrFailed() diff --git a/deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml b/deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml deleted file mode 100644 index a0971d9f2..000000000 --- a/deleted_ci_build/azure_pipelines/templates/pretrained_model_test.yml +++ /dev/null @@ -1,11 +0,0 @@ -# Run pre-trained model test - -steps: -- bash: | - set -x - status=0 - # TODO: fix unity model path - # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? - python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --skip_tf_tests $CI_SKIP_TF_TESTS --skip_tflite_tests $CI_SKIP_TFLITE_TESTS --skip_tfjs_tests $CI_SKIP_TFJS_TESTS --config tests/run_pretrained_models.yaml || status=$? - exit $status - displayName: 'Test Pre-trained Model' diff --git a/deleted_ci_build/azure_pipelines/templates/setup.yml b/deleted_ci_build/azure_pipelines/templates/setup.yml deleted file mode 100644 index 2e2e86c98..000000000 --- a/deleted_ci_build/azure_pipelines/templates/setup.yml +++ /dev/null @@ -1,62 +0,0 @@ -# Install all dependencies - -steps: -- bash: | - set -ex - pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator - pip install $(CI_PIP_ONNX_NAME) - pip install $(CI_PIP_ONNX_BACKEND_NAME) numpy - - if [[ $CI_SKIP_TFJS_TESTS == "False" ]] ; - then - pip install tensorflowjs==3.18.0 - npm install @tensorflow/tfjs - fi - - if [[ $CI_TF_VERSION == 2.* ]] ; - then - pip install onnxruntime-extensions - pip install "tensorflow-text<=$(CI_TF_VERSION)" - fi - - if [[ $CI_ONNXRUNTIME_NIGHTLY == "true" ]] ; - then - pip uninstall -y onnxruntime - # install numpy upfront since it is not on https://test.pypi.org/simple/ - pip install 'numpy>=1.18' - pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly - fi - - pip uninstall -y tensorflow - pip install $(CI_PIP_TF_NAME) - pip uninstall -y protobuf - pip install "protobuf~=3.20" - - python setup.py install - - if [[ $ONNX_TEST == "true" ]] ; - then - # onnx-weekly won't satisfy onnx requirement so uninstallation must happen here - pip uninstall -y onnx - pip install --index-url https://test.pypi.org/simple/ ${PIP_ONNX_NAME:-onnx} - fi - - pip freeze --all - displayName: 'Setup Environment' - -# TODO: remove later -# Anaconda python 3.6.8 h9f7ef89_1 changed dll lookup logic, numpy fails to load dll on Windows -# https://github.com/numpy/numpy/issues/12957 -# https://github.com/ContinuumIO/anaconda-issues/issues/10629 -# Add numpy lib path manually here -# On Windows sqlite3.dll is found under Library/bin -- bash: | - site_dir=$(python -c "import site; print(site.getsitepackages()[1])") - echo "##vso[task.prependpath]$site_dir\numpy\.libs" - base_dir=$(python -c "import site; print(site.getsitepackages()[0])") - echo "##vso[task.prependpath]$base_dir/Library/bin" - displayName: 'Fix Paths' - condition: and(succeeded(), in(variables['Agent.OS'], 'Windows_NT')) - -- bash: env - displayName: 'Display Environment Variables' diff --git a/deleted_ci_build/azure_pipelines/templates/unit_test.yml b/deleted_ci_build/azure_pipelines/templates/unit_test.yml deleted file mode 100644 index 808b9e6f3..000000000 --- a/deleted_ci_build/azure_pipelines/templates/unit_test.yml +++ /dev/null @@ -1,28 +0,0 @@ -# Run unit test - -parameters: - onnx_opset: '' - skip_tflite_tests: '' - skip_tfjs_tests: '' - skip_tf_tests: '' - -steps: -- bash: | - parameters.onnx_opset=$CI_ONNX_OPSET - parameters.skip_tflite_tests=$CI_SKIP_TFLITE_TESTS - parameters.skip_tfjs_tests=$CI_SKIP_TFJS_TESTS - parameters.skip_tf_tests=$CI_SKIP_TF_TESTS - export TF2ONNX_TEST_BACKEND=$CI_ONNX_BACKEND - export TF2ONNX_TEST_OPSET=$CI_ONNX_OPSET - export TF2ONNX_SKIP_TFLITE_TESTS=$CI_SKIP_TFLITE_TESTS - export TF2ONNX_SKIP_TFJS_TESTS=$CI_SKIP_TFJS_TESTS - export TF2ONNX_SKIP_TF_TESTS=$CI_SKIP_TF_TESTS - python -m pytest --cov=tf2onnx --cov-report=term --disable-pytest-warnings -r s tests --cov-append - timeoutInMinutes: 15 - displayName: 'Run UnitTest' - condition: succeededOrFailed() - env: - CI_ONNX_OPSET: '${{ parameters.onnx_opset }}' - CI_SKIP_TFLITE_TESTS: '${{ parameters.skip_tflite_tests }}' - CI_SKIP_TFJS_TESTS: '${{ parameters.skip_tfjs_tests }}' - CI_SKIP_TF_TESTS: '${{ parameters.skip_tf_tests }}' diff --git a/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml b/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml deleted file mode 100644 index 2b0e66dd5..000000000 --- a/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_application_tests.yml +++ /dev/null @@ -1,75 +0,0 @@ -# keras2onnx application tests (trimmed) - -jobs: - -- job: 'Linux' - timeoutInMinutes: 180 - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - Python37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - INSTALL_KERAS: pip install keras==2.3.1 - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: - INSTALL_NUMPY: pip install numpy==1.19.0 - INSTALL_LEGACY: pip install h5py==2.9.0 - NIGHTLY_BUILD_TEST: python run_all_v2.py --exclude "test_keras_applications_v2.py" - - Python38-tf2-oldest: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.9.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.2.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python310-tf2-latest: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.15.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.2.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python38-tf2-oldest-plus-1: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.2.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - Python39-tf2-latest-minus-1: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - INSTALL_KERAS: - UNINSTALL_KERAS: - INSTALL_TENSORFLOW: pip install tensorflow==2.14.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_KERAS_RESNET: pip install keras-resnet - INSTALL_TRANSFORMERS: pip install transformers==4.2.0 - INSTALL_NUMPY: - NIGHTLY_BUILD_TEST: python run_all_v2.py - - steps: - - template: 'templates/keras2onnx_application_tests.yml' - parameters: - platform: 'linux' diff --git a/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml b/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml deleted file mode 100644 index 6fc84a41d..000000000 --- a/deleted_ci_build/azure_pipelines/trimmed_keras2onnx_unit_test.yml +++ /dev/null @@ -1,102 +0,0 @@ -# Tests copied from keras2onnx - -jobs: - -- job: 'Linux' - pool: - vmImage: 'ubuntu-latest' - strategy: - matrix: - - ############ TF Keras Unit Tests ############ - Python37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - Python38-tf2-oldest: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.9.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - Python39-tf2-latest: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.15.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - Python39-tf2-oldest-plus-1: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.10.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - Python310-tf2-latest-minus-1: - python.version: '3.10' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.14.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - ############ Pure Keras Unit Tests ############ - Keras-Py37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - KERAS: keras==2.4.3 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - - steps: - - template: 'templates/keras2onnx_unit_test.yml' - parameters: - platform: 'linux' - -- job: 'Win' - pool: - vmImage: 'windows-2019' - strategy: - matrix: - ############ TF Keras Unit Tests ############ - Python37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - Python38-tf2-oldest: - python.version: '3.8' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.9.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - Python39-tf2-latest: - python.version: '3.9' - ONNX_PATH: onnx==1.15.0 - TENSORFLOW_PATH: tensorflow==2.15.0 - INSTALL_ORT: pip install onnxruntime==1.16.3 - INSTALL_NUMPY: - - ############ Pure Keras Unit Tests ############ - Keras-Py37-tf-1.15: - python.version: '3.7' # Max version that supports tf 1.15 - ONNX_PATH: onnx==1.14.1 # Max version that supports python 3.7 - KERAS: keras==2.4.3 - TENSORFLOW_PATH: tensorflow==1.15.0 - INSTALL_ORT: pip install onnxruntime==1.14.1 # Max version that supports python 3.7 - INSTALL_NUMPY: pip install numpy==1.19.0 - - - steps: - - template: 'templates/keras2onnx_unit_test.yml' - parameters: - platform: 'windows' diff --git a/deleted_ci_build/azure_pipelines/unit_test-matrix.yml b/deleted_ci_build/azure_pipelines/unit_test-matrix.yml deleted file mode 100644 index 25cc33596..000000000 --- a/deleted_ci_build/azure_pipelines/unit_test-matrix.yml +++ /dev/null @@ -1,98 +0,0 @@ -# Unit test, full matrix - -stages: - - stage: - jobs: - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.8'] - platforms: ['linux', 'windows'] - tf_versions: ['2.9.0'] - onnx_opsets: ['17', '16', '14'] - skip_tflite_tests: 'False' - skip_tf_tests: 'False' - skip_tfjs_tests: 'True' - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.9'] - platforms: ['linux', 'windows'] - tf_versions: ['2.15.0'] - onnx_opsets: ['17', '16', '14'] - skip_tflite_tests: 'False' - skip_tf_tests: 'False' - skip_tfjs_tests: 'True' - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.7'] # Max version that supports tf 1.15 - platforms: ['windows'] - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['18', '17', '16', '15'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.7'] # Max version that supports tf 1.15 - platforms: ['linux'] - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['18', '17', '16'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.10'] - tf_versions: ['2.14.0'] - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.9'] - tf_versions: ['2.12.0'] - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - platforms: ['linux', 'windows'] - python_versions: ['3.8'] - tf_versions: ['2.10.0', '2.11.0'] - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/combine_test_coverage.yml' - -schedules: -- cron: "0 10 */3 * *" - displayName: Every 3 days nightly Unit Test, full matrix. - branches: - include: - - main - always: true diff --git a/deleted_ci_build/azure_pipelines/unit_test.yml b/deleted_ci_build/azure_pipelines/unit_test.yml deleted file mode 100644 index 0149196ed..000000000 --- a/deleted_ci_build/azure_pipelines/unit_test.yml +++ /dev/null @@ -1,100 +0,0 @@ -# Unit test - -stages: - - stage: - jobs: - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.8'] - platforms: ['linux', 'windows'] - tf_versions: ['2.9.0'] - onnx_opsets: ['18', '15'] - skip_tflite_tests: 'False' - skip_tf_tests: 'False' - skip_tfjs_tests: 'True' - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.9'] - platforms: ['linux', 'windows'] - tf_versions: ['2.15.0'] - onnx_opsets: ['18', '15'] - skip_tflite_tests: 'False' - skip_tf_tests: 'False' - skip_tfjs_tests: 'True' - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.10'] - platforms: ['linux'] - tf_versions: ['2.9.0', '2.15.0'] - onnx_opsets: ['18', '15'] - skip_tflite_tests: 'False' - skip_tf_tests: 'False' - skip_tfjs_tests: 'True' - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - - template: 'templates/job_generator.yml' - parameters: - python_versions: ['3.7'] # Max version that supports tf 1.15 - platforms: ['linux'] - tf_versions: ['1.15.5'] - onnx_versions: ['1.14.1'] # Max version that supports python 3.7 - onnx_opsets: ['15'] - onnx_backends: {onnxruntime: ['1.14.1']} # Max version that supports python 3.7 - job: - steps: - - template: 'unit_test.yml' - report_coverage: 'True' - - # TODO: Enable these tests once https://github.com/onnx/tensorflow-onnx/issues/2118 is fixed. - # - template: 'templates/job_generator.yml' - # parameters: - # python_versions: ['3.9'] - # tf_versions: ['2.9.0'] - # onnx_opsets: [''] - # skip_tfjs_tests: 'False' - # skip_tf_tests: 'True' - # job: - # steps: - # - template: 'unit_test.yml' - # report_coverage: 'True' - - # TODO: Enable these tests once https://github.com/onnx/tensorflow-onnx/issues/2118 is fixed. - # - template: 'templates/job_generator.yml' - # parameters: - # python_versions: ['3.9'] - # tf_versions: ['2.7.4'] - # onnx_opsets: [''] - # skip_tfjs_tests: 'False' - # skip_tf_tests: 'True' - # job: - # steps: - # - template: 'unit_test.yml' - # report_coverage: 'True' - - # TODO: Enable these tests once https://github.com/onnx/tensorflow-onnx/issues/2118 is fixed. - # - template: 'templates/job_generator.yml' - # parameters: - # python_versions: ['3.10'] - # tf_versions: ['2.9.1'] - # onnx_opsets: [''] - # skip_tfjs_tests: 'False' - # skip_tf_tests: 'True' - # job: - # steps: - # - template: 'unit_test.yml' - # report_coverage: 'True' - - - template: 'templates/combine_test_coverage.yml' From 527efa28c99aa8bc03366429b398d80d85239bff Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 20 Jun 2024 11:11:32 +0000 Subject: [PATCH 092/124] Try if statement. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_core.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index d95a77504..da6913280 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -9,16 +9,21 @@ 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'] + tf_version: ['2.9.0', '2.15.0'] python_version: ['3.8', '3.9'] opset_version: ['18', '15'] ort_version: ['1.16.3'] os: ['ubuntu-latest', 'windows-2022'] - + if: ${{ matrix.tf_version == '2.9.0' && matrix.python_version == '3.8' }} runs-on: ${{ matrix.os }} steps: @@ -74,6 +79,7 @@ jobs: path: ./**/test-results-*.xml publish-test-results: + fail-fast: false name: "Publish Tests Results to Github" needs: run_tests runs-on: ubuntu-latest From 0d1b6b82ae8078e5cb995ddc6373dde59a9e0153 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Thu, 20 Jun 2024 15:59:42 +0000 Subject: [PATCH 093/124] Update if. Signed-off-by: Jay Zhang --- .github/workflows/pylint.yml | 2 +- .github/workflows/unit_tests_core.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 8e6d09c64..6586126ea 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,4 +1,4 @@ -name: Pylint Workflow +name: Pylint on: pull_request: diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index da6913280..3443b9af5 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -23,8 +23,9 @@ jobs: opset_version: ['18', '15'] ort_version: ['1.16.3'] os: ['ubuntu-latest', 'windows-2022'] - if: ${{ matrix.tf_version == '2.9.0' && matrix.python_version == '3.8' }} runs-on: ${{ matrix.os }} + # if: ${{ matrix.tf_version == '2.9.0' && matrix.python_version == '3.8' }} + if: ${{ matrix.tf_version == '2.9.0' }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -79,7 +80,6 @@ jobs: path: ./**/test-results-*.xml publish-test-results: - fail-fast: false name: "Publish Tests Results to Github" needs: run_tests runs-on: ubuntu-latest From 435ed5f0e476a419e9e83c9a205b781b38a9b0a2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 02:59:45 +0000 Subject: [PATCH 094/124] Leverage include to limite the scope. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_core.yml | 5 +++++ .github/workflows/keras_unit_test_core.yml | 5 +++++ .../workflows/pretrained_model_tests_core.yml | 21 ++++++++++++++++--- .github/workflows/unit_tests_core.yml | 20 ++++++++++++------ tests/utils/setup_test_env.sh | 8 ++++--- 5 files changed, 47 insertions(+), 12 deletions(-) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_core.yml index d35ece74f..583c94162 100644 --- a/.github/workflows/keras_application_test_core.yml +++ b/.github/workflows/keras_application_test_core.yml @@ -9,9 +9,14 @@ 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'] diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_core.yml index 3894ca166..cae5512fc 100644 --- a/.github/workflows/keras_unit_test_core.yml +++ b/.github/workflows/keras_unit_test_core.yml @@ -9,9 +9,14 @@ 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'] diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_core.yml index 0df68887f..0c520c883 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_core.yml @@ -9,14 +9,29 @@ 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'] opset_version: ['18', '15'] ort_version: ['1.16.3'] + onnx_version: [''1.16.1'] + include: + - tf_version: '2.9.0' + python_version: '3.8' + - tf_version: '2.15.0' + python_version: '3.9' + - 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 @@ -33,7 +48,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' diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_core.yml index 3443b9af5..1ce8bacb0 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_core.yml @@ -18,14 +18,22 @@ jobs: strategy: fail-fast: false matrix: - tf_version: ['2.9.0', '2.15.0'] - python_version: ['3.8', '3.9'] + os: ['ubuntu-latest', 'windows-2022'] opset_version: ['18', '15'] ort_version: ['1.16.3'] - os: ['ubuntu-latest', 'windows-2022'] + onnx_version: [''1.16.1'] + include: + - tf_version: '2.9.0' + python_version: '3.8' + - tf_version: '2.15.0' + python_version: '3.9' + - 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: ${{ matrix.os }} - # if: ${{ matrix.tf_version == '2.9.0' && matrix.python_version == '3.8' }} - if: ${{ matrix.tf_version == '2.9.0' }} steps: - name: Set up Python (${{ matrix.python_version }}) @@ -40,7 +48,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' diff --git a/tests/utils/setup_test_env.sh b/tests/utils/setup_test_env.sh index 004f2505b..c6fc03399 100755 --- a/tests/utils/setup_test_env.sh +++ b/tests/utils/setup_test_env.sh @@ -1,20 +1,22 @@ #!/bin/bash # # Check if the argument is provided -if [ "$#" -ne 2 ]; then - echo "Usage: $0 " +if [ "$#" -ne 3 ]; then + echo "Usage: $0 " 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 From ce2344388e2e10815dfc29998d10596cf5aeb8b8 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 03:04:07 +0000 Subject: [PATCH 095/124] Fix a typo and rename files. Signed-off-by: Jay Zhang --- ..._application_test_core.yml => keras_application_test_ci.yml} | 0 .../{keras_unit_test_core.yml => keras_unit_test_ci.yml} | 0 ...ained_model_tests_core.yml => pretrained_model_tests_ci.yml} | 2 +- .github/workflows/{unit_tests_core.yml => unit_tests_ci.yml} | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{keras_application_test_core.yml => keras_application_test_ci.yml} (100%) rename .github/workflows/{keras_unit_test_core.yml => keras_unit_test_ci.yml} (100%) rename .github/workflows/{pretrained_model_tests_core.yml => pretrained_model_tests_ci.yml} (98%) rename .github/workflows/{unit_tests_core.yml => unit_tests_ci.yml} (99%) diff --git a/.github/workflows/keras_application_test_core.yml b/.github/workflows/keras_application_test_ci.yml similarity index 100% rename from .github/workflows/keras_application_test_core.yml rename to .github/workflows/keras_application_test_ci.yml diff --git a/.github/workflows/keras_unit_test_core.yml b/.github/workflows/keras_unit_test_ci.yml similarity index 100% rename from .github/workflows/keras_unit_test_core.yml rename to .github/workflows/keras_unit_test_ci.yml diff --git a/.github/workflows/pretrained_model_tests_core.yml b/.github/workflows/pretrained_model_tests_ci.yml similarity index 98% rename from .github/workflows/pretrained_model_tests_core.yml rename to .github/workflows/pretrained_model_tests_ci.yml index 0c520c883..02f80d6a3 100644 --- a/.github/workflows/pretrained_model_tests_core.yml +++ b/.github/workflows/pretrained_model_tests_ci.yml @@ -20,7 +20,7 @@ jobs: matrix: opset_version: ['18', '15'] ort_version: ['1.16.3'] - onnx_version: [''1.16.1'] + onnx_version: ['1.16.1'] include: - tf_version: '2.9.0' python_version: '3.8' diff --git a/.github/workflows/unit_tests_core.yml b/.github/workflows/unit_tests_ci.yml similarity index 99% rename from .github/workflows/unit_tests_core.yml rename to .github/workflows/unit_tests_ci.yml index 1ce8bacb0..9fff20fc1 100644 --- a/.github/workflows/unit_tests_core.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -21,7 +21,7 @@ jobs: os: ['ubuntu-latest', 'windows-2022'] opset_version: ['18', '15'] ort_version: ['1.16.3'] - onnx_version: [''1.16.1'] + onnx_version: ['1.16.1'] include: - tf_version: '2.9.0' python_version: '3.8' From dbb2f43c44150e902bded24ed426b2df63e9a40f Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 03:31:48 +0000 Subject: [PATCH 096/124] Finish updating 2 CI files. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_ci.yml | 4 +++- .github/workflows/unit_tests_ci.yml | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_ci.yml b/.github/workflows/pretrained_model_tests_ci.yml index 02f80d6a3..c1658a956 100644 --- a/.github/workflows/pretrained_model_tests_ci.yml +++ b/.github/workflows/pretrained_model_tests_ci.yml @@ -18,6 +18,8 @@ jobs: strategy: fail-fast: false matrix: + tf_version: ['2.9.0', '2.15.0'] + python_version: ['3.9'] opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] @@ -25,7 +27,7 @@ jobs: - tf_version: '2.9.0' python_version: '3.8' - tf_version: '2.15.0' - python_version: '3.9' + python_version: '3.10' - tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 9fff20fc1..b79b228d8 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -15,24 +15,29 @@ concurrency: jobs: run_tests: + name: Test (${{ matrix.python_version }}-${{ matrix.tf_version }}-${{ matrix.opset_version }}-${{ matrix.os }}) strategy: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] + tf_version: ['2.9.0', '2.15.0'] + python_version: ['3.9'] opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] + skip_tflite: ['False'] include: - tf_version: '2.9.0' python_version: '3.8' - tf_version: '2.15.0' - python_version: '3.9' + python_version: '3.10' - 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 }} steps: @@ -63,7 +68,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 @@ -74,7 +79,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 From f47942ee11ce90731b899c9649ee74d1da4b3caa Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 03:35:08 +0000 Subject: [PATCH 097/124] Remove name of jobs. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index b79b228d8..b3d65eb91 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -15,7 +15,6 @@ concurrency: jobs: run_tests: - name: Test (${{ matrix.python_version }}-${{ matrix.tf_version }}-${{ matrix.opset_version }}-${{ matrix.os }}) strategy: fail-fast: false matrix: From 71c3396ba863ad0e61a1fad29e78dd561996c578 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 05:56:15 +0000 Subject: [PATCH 098/124] Update unit tests ci. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index b3d65eb91..cbae2783a 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -32,7 +32,6 @@ jobs: python_version: '3.10' - 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' From d73aa7597e1f0f2501a8046eb17fbccd2cd866c2 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 06:02:13 +0000 Subject: [PATCH 099/124] Correct the includes settings. Signed-off-by: Jay Zhang --- .github/workflows/pretrained_model_tests_ci.yml | 6 ++++-- .github/workflows/unit_tests_ci.yml | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_ci.yml b/.github/workflows/pretrained_model_tests_ci.yml index c1658a956..5f2dfd987 100644 --- a/.github/workflows/pretrained_model_tests_ci.yml +++ b/.github/workflows/pretrained_model_tests_ci.yml @@ -18,14 +18,16 @@ jobs: strategy: fail-fast: false matrix: - tf_version: ['2.9.0', '2.15.0'] - python_version: ['3.9'] opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] include: - tf_version: '2.9.0' python_version: '3.8' + - tf_version: '2.9.0' + python_version: '3.9' + - tf_version: '2.15.0' + python_version: '3.9' - tf_version: '2.15.0' python_version: '3.10' - tf_version: '1.15.5' diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index cbae2783a..ee14f1a33 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,8 +19,6 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] - tf_version: ['2.9.0', '2.15.0'] - python_version: ['3.9'] opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] @@ -28,14 +26,20 @@ jobs: include: - tf_version: '2.9.0' python_version: '3.8' + - tf_version: '2.9.0' + python_version: '3.9' + - tf_version: '2.15.0' + python_version: '3.9' - tf_version: '2.15.0' python_version: '3.10' - 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 }} steps: From 8407a63d458d04971cc154b80e6871c296abf7e9 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Fri, 21 Jun 2024 06:08:58 +0000 Subject: [PATCH 100/124] Try other scenarios. Signed-off-by: Jay Zhang --- .../workflows/pretrained_model_tests_ci.yml | 16 ++++++++-------- .github/workflows/unit_tests_ci.yml | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/pretrained_model_tests_ci.yml b/.github/workflows/pretrained_model_tests_ci.yml index 5f2dfd987..73f5684af 100644 --- a/.github/workflows/pretrained_model_tests_ci.yml +++ b/.github/workflows/pretrained_model_tests_ci.yml @@ -28,14 +28,14 @@ jobs: python_version: '3.9' - tf_version: '2.15.0' python_version: '3.9' - - tf_version: '2.15.0' - python_version: '3.10' - - 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' + # - tf_version: '2.15.0' + # python_version: '3.10' + # - 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 diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index ee14f1a33..44eb1b64c 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -30,15 +30,15 @@ jobs: python_version: '3.9' - tf_version: '2.15.0' python_version: '3.9' - - tf_version: '2.15.0' - python_version: '3.10' - - 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' + # - tf_version: '2.15.0' + # python_version: '3.10' + # - 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 }} From d6304105f43abb357af77cc2c18a44b4f0d6bf67 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 14:45:06 +0000 Subject: [PATCH 101/124] Refactor include. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 44eb1b64c..2ab436368 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,26 +19,32 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] - opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] skip_tflite: ['False'] include: - tf_version: '2.9.0' python_version: '3.8' + opset_version: '18' + - tf_version: '2.9.0' + python_version: '3.8' + opset_version: '15' - tf_version: '2.9.0' python_version: '3.9' + opset_version: '18' - tf_version: '2.15.0' python_version: '3.9' - # - tf_version: '2.15.0' - # python_version: '3.10' - # - 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' + opset_version: '18' + - tf_version: '2.15.0' + python_version: '3.10' + opset_version: '18' + - 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 }} From ec0f91a07f3e2f2208d0b36173102b7914256041 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 14:51:07 +0000 Subject: [PATCH 102/124] Refactor include. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 2ab436368..87b7cc924 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,9 +19,9 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] - ort_version: ['1.16.3'] - onnx_version: ['1.16.1'] - skip_tflite: ['False'] + ort_version: '1.16.3' + onnx_version: '1.16.1' + skip_tflite: 'False' include: - tf_version: '2.9.0' python_version: '3.8' From d9f5e1911d6c44b7cf3d3bb4e22ae41c8168d7a5 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 14:53:35 +0000 Subject: [PATCH 103/124] Update include. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 87b7cc924..f56d5544f 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,9 +19,9 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] - ort_version: '1.16.3' - onnx_version: '1.16.1' - skip_tflite: 'False' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False include: - tf_version: '2.9.0' python_version: '3.8' From 42d91109e307e4e1af41a7c6e9580941968f698b Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 14:57:28 +0000 Subject: [PATCH 104/124] Refactor include. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index f56d5544f..cc4454203 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,25 +19,37 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: False include: - tf_version: '2.9.0' python_version: '3.8' opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False - tf_version: '2.9.0' python_version: '3.8' opset_version: '15' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False - tf_version: '2.9.0' python_version: '3.9' opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False - tf_version: '2.15.0' python_version: '3.9' opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False - tf_version: '2.15.0' python_version: '3.10' opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 + skip_tflite: False - tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' From 6af85c912a68455eaaad5dad7d24132bc8bb1d46 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:02:51 +0000 Subject: [PATCH 105/124] Change again. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index cc4454203..81f90c116 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -18,7 +18,10 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-2022'] + os: [ubuntu-latest, windows-2022] + tf_version: + - '2.9.0' + - '2.15.0' include: - tf_version: '2.9.0' python_version: '3.8' From b79835d8436b88cfad76e10c6c62c16be9adf374 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:10:30 +0000 Subject: [PATCH 106/124] Move some to common part. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 81f90c116..52803d186 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -22,37 +22,34 @@ jobs: tf_version: - '2.9.0' - '2.15.0' + python_version: '3.9' + skip_tflite: 'False' include: - tf_version: '2.9.0' python_version: '3.8' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 - skip_tflite: False - tf_version: '2.9.0' python_version: '3.8' opset_version: '15' ort_version: 1.16.3 onnx_version: 1.16.1 - skip_tflite: False - - tf_version: '2.9.0' - python_version: '3.9' - opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: False - - tf_version: '2.15.0' - python_version: '3.9' - opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: False + # - tf_version: '2.9.0' + # python_version: '3.9' + # opset_version: '18' + # ort_version: 1.16.3 + # onnx_version: 1.16.1 + # - tf_version: '2.15.0' + # python_version: '3.9' + # opset_version: '18' + # ort_version: 1.16.3 + # onnx_version: 1.16.1 - tf_version: '2.15.0' python_version: '3.10' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 - skip_tflite: False - tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' From 21790d9e201285a7de00e293265ffe188a11fe21 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:12:22 +0000 Subject: [PATCH 107/124] Reformat the value. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 52803d186..7e9a05240 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -22,8 +22,10 @@ jobs: tf_version: - '2.9.0' - '2.15.0' - python_version: '3.9' - skip_tflite: 'False' + python_version: + - '3.9' + skip_tflite: + - 'False' include: - tf_version: '2.9.0' python_version: '3.8' From 4ed6f2d98d3e1c38f8dda4d69a8c2b6b9696d71d Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:15:14 +0000 Subject: [PATCH 108/124] Refactor. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 7e9a05240..d6e4efe29 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -24,19 +24,20 @@ jobs: - '2.15.0' python_version: - '3.9' - skip_tflite: - - 'False' + - '3.10' include: - tf_version: '2.9.0' python_version: '3.8' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 + skip_tflite: 'False' - tf_version: '2.9.0' python_version: '3.8' opset_version: '15' ort_version: 1.16.3 onnx_version: 1.16.1 + skip_tflite: 'False' # - tf_version: '2.9.0' # python_version: '3.9' # opset_version: '18' @@ -52,6 +53,7 @@ jobs: opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 + skip_tflite: 'False' - tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' From 320530b32dba0f453cd10b7a68c966c4e0199bcf Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:17:10 +0000 Subject: [PATCH 109/124] Refactor Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index d6e4efe29..718c6c068 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,12 +19,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-2022] - tf_version: - - '2.9.0' - - '2.15.0' - python_version: - - '3.9' - - '3.10' + tf_version: ['2.9.0', '2.15.0'] + python_version: ['3.9', '3.10'] include: - tf_version: '2.9.0' python_version: '3.8' From 44a40c674c81d764110fa014abf8829cf0d30059 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:18:46 +0000 Subject: [PATCH 110/124] Refactor. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 718c6c068..af953c1b0 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -18,9 +18,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-2022] - tf_version: ['2.9.0', '2.15.0'] - python_version: ['3.9', '3.10'] + os: ['ubuntu-latest', 'windows-2022'] include: - tf_version: '2.9.0' python_version: '3.8' @@ -34,16 +32,16 @@ jobs: ort_version: 1.16.3 onnx_version: 1.16.1 skip_tflite: 'False' - # - tf_version: '2.9.0' - # python_version: '3.9' - # opset_version: '18' - # ort_version: 1.16.3 - # onnx_version: 1.16.1 - # - tf_version: '2.15.0' - # python_version: '3.9' - # opset_version: '18' - # ort_version: 1.16.3 - # onnx_version: 1.16.1 + - tf_version: '2.9.0' + python_version: '3.9' + opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 + - tf_version: '2.15.0' + python_version: '3.9' + opset_version: '18' + ort_version: 1.16.3 + onnx_version: 1.16.1 - tf_version: '2.15.0' python_version: '3.10' opset_version: '18' From 7eeee83c64d8bfbb7c91a919e93805df3045986a Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:22:42 +0000 Subject: [PATCH 111/124] Add name. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index af953c1b0..d376b3b76 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,36 +19,49 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] + name: + - 'test_01' + - 'test_02' + - 'test_03' + - 'test_04' + - 'test_05' + - 'test_06' include: - - tf_version: '2.9.0' + - name: 'test_01' + tf_version: '2.9.0' python_version: '3.8' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 skip_tflite: 'False' - - tf_version: '2.9.0' + - name: 'test_02' + tf_version: '2.9.0' python_version: '3.8' opset_version: '15' ort_version: 1.16.3 onnx_version: 1.16.1 skip_tflite: 'False' - - tf_version: '2.9.0' + - name: 'test_03' + tf_version: '2.9.0' python_version: '3.9' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 - - tf_version: '2.15.0' + - name: 'test_04' + tf_version: '2.15.0' python_version: '3.9' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 - - tf_version: '2.15.0' + - name: 'test_05' + tf_version: '2.15.0' python_version: '3.10' opset_version: '18' ort_version: 1.16.3 onnx_version: 1.16.1 skip_tflite: 'False' - - tf_version: '1.15.5' + - name: 'test_06' + tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' opset_version: '15' From fd86a8376525c5eb5639286867cb3650f1d437a9 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:31:43 +0000 Subject: [PATCH 112/124] Refactor. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index d376b3b76..eca92bd7e 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -25,7 +25,6 @@ jobs: - 'test_03' - 'test_04' - 'test_05' - - 'test_06' include: - name: 'test_01' tf_version: '2.9.0' @@ -44,9 +43,9 @@ jobs: - name: 'test_03' tf_version: '2.9.0' python_version: '3.9' - opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 + opset_version: '15' + ort_version: '1.16.3' + onnx_version: '1.16.1' - name: 'test_04' tf_version: '2.15.0' python_version: '3.9' From 3c7d5abf74d1b46627b7a496eb67f6ef18605794 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:37:10 +0000 Subject: [PATCH 113/124] Refactor. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index eca92bd7e..49f56420a 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -22,43 +22,38 @@ jobs: name: - 'test_01' - 'test_02' - - 'test_03' - 'test_04' - 'test_05' + skip_tflite: 'False' include: - name: 'test_01' tf_version: '2.9.0' python_version: '3.8' opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: 'False' + ort_version: '1.16.3' + onnx_version: '1.16.1' + # skip_tflite: 'False' - name: 'test_02' tf_version: '2.9.0' python_version: '3.8' opset_version: '15' - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: 'False' - - name: 'test_03' - tf_version: '2.9.0' - python_version: '3.9' - opset_version: '15' ort_version: '1.16.3' onnx_version: '1.16.1' + # skip_tflite: 'False' - name: 'test_04' tf_version: '2.15.0' python_version: '3.9' opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 + ort_version: '1.16.3' + onnx_version: '1.16.1' + # skip_tflite: 'False' - name: 'test_05' tf_version: '2.15.0' python_version: '3.10' opset_version: '18' - ort_version: 1.16.3 - onnx_version: 1.16.1 - skip_tflite: 'False' + ort_version: '1.16.3' + onnx_version: '1.16.1' + # skip_tflite: 'False' - name: 'test_06' tf_version: '1.15.5' python_version: '3.7' From 4dd4f9bbf7da177ce2c2e98586de3ae044305e90 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:50:13 +0000 Subject: [PATCH 114/124] Refactor names. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 49f56420a..d48eefd9c 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -19,42 +19,42 @@ jobs: fail-fast: false matrix: os: ['ubuntu-latest', 'windows-2022'] + opset_version: [18, 15] name: - - 'test_01' - - 'test_02' - - 'test_04' - - 'test_05' - skip_tflite: 'False' + - 'py38-tf2.9' + - 'py39-tf2.15' + - 'py310-tf2.15' + - 'py37-tf1.15' include: - - name: 'test_01' + - name: 'py38-tf2.9' tf_version: '2.9.0' python_version: '3.8' - opset_version: '18' + # opset_version: '18' ort_version: '1.16.3' onnx_version: '1.16.1' - # skip_tflite: 'False' - - name: 'test_02' - tf_version: '2.9.0' - python_version: '3.8' - opset_version: '15' - ort_version: '1.16.3' - onnx_version: '1.16.1' - # skip_tflite: 'False' - - name: 'test_04' + skip_tflite: 'False' + # - name: 'test_02' + # tf_version: '2.9.0' + # python_version: '3.8' + # # opset_version: '15' + # ort_version: '1.16.3' + # onnx_version: '1.16.1' + # skip_tflite: 'False' + - name: 'py39-tf2.15' tf_version: '2.15.0' python_version: '3.9' - opset_version: '18' + # opset_version: '18' ort_version: '1.16.3' onnx_version: '1.16.1' - # skip_tflite: 'False' - - name: 'test_05' + skip_tflite: 'False' + - name: 'py310-tf2.15' tf_version: '2.15.0' python_version: '3.10' - opset_version: '18' + # opset_version: '18' ort_version: '1.16.3' onnx_version: '1.16.1' - # skip_tflite: 'False' - - name: 'test_06' + skip_tflite: 'False' + - name: 'py37-tf1.15' tf_version: '1.15.5' python_version: '3.7' os: 'ubuntu-latest' From c7466473214569f1ee92df48b6f6b3820cdc98a7 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Sun, 23 Jun 2024 15:52:19 +0000 Subject: [PATCH 115/124] Remove a name. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index d48eefd9c..bddb47247 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -24,7 +24,6 @@ jobs: - 'py38-tf2.9' - 'py39-tf2.15' - 'py310-tf2.15' - - 'py37-tf1.15' include: - name: 'py38-tf2.9' tf_version: '2.9.0' From 9e441ebac2941cc487439e59304e73d9eef1bffa Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 02:13:16 +0000 Subject: [PATCH 116/124] Move ort_version out of each job. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index bddb47247..34ea10a3e 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -18,39 +18,31 @@ jobs: strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'windows-2022'] - opset_version: [18, 15] name: - 'py38-tf2.9' - 'py39-tf2.15' - 'py310-tf2.15' + os: ['ubuntu-latest', 'windows-2022'] + opset_version: [18, 15] + ort_version: ['1.16.3'] include: - name: 'py38-tf2.9' tf_version: '2.9.0' python_version: '3.8' - # opset_version: '18' - ort_version: '1.16.3' onnx_version: '1.16.1' skip_tflite: 'False' - # - name: 'test_02' - # tf_version: '2.9.0' - # python_version: '3.8' - # # opset_version: '15' - # ort_version: '1.16.3' - # onnx_version: '1.16.1' - # skip_tflite: 'False' - name: 'py39-tf2.15' tf_version: '2.15.0' python_version: '3.9' # opset_version: '18' - ort_version: '1.16.3' + # ort_version: '1.16.3' onnx_version: '1.16.1' skip_tflite: 'False' - name: 'py310-tf2.15' tf_version: '2.15.0' python_version: '3.10' # opset_version: '18' - ort_version: '1.16.3' + # ort_version: '1.16.3' onnx_version: '1.16.1' skip_tflite: 'False' - name: 'py37-tf1.15' From eca92fa00b3fe040958704a388873aea47556ee8 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 02:15:54 +0000 Subject: [PATCH 117/124] Correct all settings. Signed-off-by: Jay Zhang --- .github/workflows/unit_tests_ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 34ea10a3e..6fc5b3ea2 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -25,26 +25,18 @@ jobs: os: ['ubuntu-latest', 'windows-2022'] opset_version: [18, 15] ort_version: ['1.16.3'] + onnx_version: ['1.16.1'] + skip_tflite: ['False'] include: - name: 'py38-tf2.9' tf_version: '2.9.0' python_version: '3.8' - onnx_version: '1.16.1' - skip_tflite: 'False' - name: 'py39-tf2.15' tf_version: '2.15.0' python_version: '3.9' - # opset_version: '18' - # ort_version: '1.16.3' - onnx_version: '1.16.1' - skip_tflite: 'False' - name: 'py310-tf2.15' tf_version: '2.15.0' python_version: '3.10' - # opset_version: '18' - # ort_version: '1.16.3' - onnx_version: '1.16.1' - skip_tflite: 'False' - name: 'py37-tf1.15' tf_version: '1.15.5' python_version: '3.7' From e74e670f28463ae5d486d5031da4832212310db6 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 02:50:31 +0000 Subject: [PATCH 118/124] Complete all settings. Signed-off-by: Jay Zhang --- .../workflows/keras_application_test_ci.yml | 26 ++++++++++++--- .github/workflows/keras_unit_test_ci.yml | 26 ++++++++++++--- .../workflows/pretrained_model_tests_ci.yml | 32 ++++++++++++------- .github/workflows/unit_tests_ci.yml | 8 +++-- 4 files changed, 69 insertions(+), 23 deletions(-) diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index 583c94162..e4d553dd3 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -1,4 +1,4 @@ -name: Keras2onnx Application Tests (CI) +name: Keras2onnx App Test (CI) on: pull_request: @@ -18,12 +18,28 @@ jobs: 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.14' + 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' + - name: 'py310-tf2.14' + tf_version: '2.14.0' + python_version: '3.10' runs-on: ${{ matrix.os }} diff --git a/.github/workflows/keras_unit_test_ci.yml b/.github/workflows/keras_unit_test_ci.yml index cae5512fc..0defef5f2 100644 --- a/.github/workflows/keras_unit_test_ci.yml +++ b/.github/workflows/keras_unit_test_ci.yml @@ -1,4 +1,4 @@ -name: Keras2onnx Unit Tests (CI) +name: Keras2onnx Unit Test (CI) on: pull_request: @@ -18,12 +18,28 @@ jobs: 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.14' + 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' + - name: 'py310-tf2.14' + tf_version: '2.14.0' + python_version: '3.10' runs-on: ${{ matrix.os }} diff --git a/.github/workflows/pretrained_model_tests_ci.yml b/.github/workflows/pretrained_model_tests_ci.yml index 73f5684af..cc3826c69 100644 --- a/.github/workflows/pretrained_model_tests_ci.yml +++ b/.github/workflows/pretrained_model_tests_ci.yml @@ -18,24 +18,34 @@ jobs: strategy: fail-fast: false matrix: + 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: - - tf_version: '2.9.0' + - name: 'py38-tf2.9' + tf_version: '2.9.0' python_version: '3.8' - - tf_version: '2.9.0' + - name: 'py39-tf2.9' + tf_version: '2.9.0' python_version: '3.9' - - tf_version: '2.15.0' + - name: 'py39-tf2.15' + tf_version: '2.15.0' python_version: '3.9' - # - tf_version: '2.15.0' - # python_version: '3.10' - # - 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' + - 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 diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml index 6fc5b3ea2..6239f8aed 100644 --- a/.github/workflows/unit_tests_ci.yml +++ b/.github/workflows/unit_tests_ci.yml @@ -1,4 +1,4 @@ -name: Unit Tests (CI) +name: Unit Test (CI) on: pull_request: @@ -20,10 +20,11 @@ jobs: matrix: name: - 'py38-tf2.9' + - 'py39-tf2.10' - 'py39-tf2.15' - 'py310-tf2.15' os: ['ubuntu-latest', 'windows-2022'] - opset_version: [18, 15] + opset_version: ['18', '15'] ort_version: ['1.16.3'] onnx_version: ['1.16.1'] skip_tflite: ['False'] @@ -31,6 +32,9 @@ jobs: - 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' From 9d51946c89b06184513ec2781b6d00f0c8f64c87 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 03:24:27 +0000 Subject: [PATCH 119/124] Limit numpy version for CI. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_ci.yml | 1 + .github/workflows/keras_unit_test_ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index e4d553dd3..88d6465cb 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -84,6 +84,7 @@ jobs: pip install transformers==4.2.0 pip install keras-self-attention pip install pytest pytest-cov pytest-runner + pip install numpy==1.21.6 pip install -e . diff --git a/.github/workflows/keras_unit_test_ci.yml b/.github/workflows/keras_unit_test_ci.yml index 0defef5f2..052db17c9 100644 --- a/.github/workflows/keras_unit_test_ci.yml +++ b/.github/workflows/keras_unit_test_ci.yml @@ -67,6 +67,7 @@ jobs: pip install onnxruntime==${{ matrix.ort_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" + pip install numpy==1.21.6 pip install -e . echo "----- List all of depdencies:" From 68f4861ece822689e9de6de85330af5419f98fad Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 03:26:24 +0000 Subject: [PATCH 120/124] Limit numpy version for unit test. Signed-off-by: Jay Zhang --- tests/utils/setup_test_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/utils/setup_test_env.sh b/tests/utils/setup_test_env.sh index c6fc03399..e9d1d1808 100755 --- a/tests/utils/setup_test_env.sh +++ b/tests/utils/setup_test_env.sh @@ -18,7 +18,7 @@ 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==$ONNX_VERSION pip install onnxruntime==$ORT_VERSION -pip install numpy +pip install numpy==1.21.6 pip install onnxruntime-extensions pip install "tensorflow-text<=$TF_VERSION" From b0cd2d599dc12eed262f6e0215644b852ba24649 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 07:21:53 +0000 Subject: [PATCH 121/124] Update the numpy version for CI. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_ci.yml | 2 +- .github/workflows/keras_unit_test_ci.yml | 3 ++- tests/utils/setup_test_env.sh | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index 88d6465cb..1116d5827 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -84,7 +84,7 @@ jobs: pip install transformers==4.2.0 pip install keras-self-attention pip install pytest pytest-cov pytest-runner - pip install numpy==1.21.6 + pip install "numpy<2" pip install -e . diff --git a/.github/workflows/keras_unit_test_ci.yml b/.github/workflows/keras_unit_test_ci.yml index 052db17c9..f4c47eb16 100644 --- a/.github/workflows/keras_unit_test_ci.yml +++ b/.github/workflows/keras_unit_test_ci.yml @@ -67,7 +67,8 @@ jobs: pip install onnxruntime==${{ matrix.ort_version }} pip uninstall -y protobuf pip install "protobuf~=3.20" - pip install numpy==1.21.6 + pip install "numpy<2" + pip install -e . echo "----- List all of depdencies:" diff --git a/tests/utils/setup_test_env.sh b/tests/utils/setup_test_env.sh index e9d1d1808..a14828d05 100755 --- a/tests/utils/setup_test_env.sh +++ b/tests/utils/setup_test_env.sh @@ -18,7 +18,7 @@ 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==$ONNX_VERSION pip install onnxruntime==$ORT_VERSION -pip install numpy==1.21.6 +pip install "numpy<2" pip install onnxruntime-extensions pip install "tensorflow-text<=$TF_VERSION" From 399c8a04305a43410a59cfb15ed445246dc919d0 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 08:09:09 +0000 Subject: [PATCH 122/124] Change the combination. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_ci.yml | 12 ++++++------ .github/workflows/keras_unit_test_ci.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index 1116d5827..d5bce4179 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -21,8 +21,8 @@ jobs: name: - 'py38-tf2.9' - 'py39-tf2.10' - - 'py39-tf2.15' - - 'py310-tf2.14' + - 'py39-tf2.14' + - 'py310-tf2.15' os: ['ubuntu-latest', 'windows-2022'] opset_version: ['18', '15'] ort_version: ['1.16.3'] @@ -34,11 +34,11 @@ jobs: - 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.14' + - 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 }} diff --git a/.github/workflows/keras_unit_test_ci.yml b/.github/workflows/keras_unit_test_ci.yml index f4c47eb16..d3adb640c 100644 --- a/.github/workflows/keras_unit_test_ci.yml +++ b/.github/workflows/keras_unit_test_ci.yml @@ -21,8 +21,8 @@ jobs: name: - 'py38-tf2.9' - 'py39-tf2.10' - - 'py39-tf2.15' - - 'py310-tf2.14' + - 'py39-tf2.14' + - 'py310-tf2.15' os: ['ubuntu-latest', 'windows-2022'] opset_version: ['18', '15'] ort_version: ['1.16.3'] @@ -34,11 +34,11 @@ jobs: - 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.14' + - 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 }} From 1eddac538e2292cd1c8a03c04ad29ee9d42f5b01 Mon Sep 17 00:00:00 2001 From: Jay Zhang Date: Mon, 24 Jun 2024 08:21:42 +0000 Subject: [PATCH 123/124] Remove one check setting. Signed-off-by: Jay Zhang --- .github/workflows/keras_application_test_ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index d5bce4179..1e4554f88 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -21,8 +21,7 @@ jobs: name: - 'py38-tf2.9' - 'py39-tf2.10' - - 'py39-tf2.14' - - 'py310-tf2.15' + - 'py39-tf2.15' os: ['ubuntu-latest', 'windows-2022'] opset_version: ['18', '15'] ort_version: ['1.16.3'] @@ -34,12 +33,9 @@ jobs: - 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' + - name: 'py39-tf2.15' tf_version: '2.15.0' - python_version: '3.10' + python_version: '3.9' runs-on: ${{ matrix.os }} From 000416327f1cd6d3f8028fdf15ff47375067eaae Mon Sep 17 00:00:00 2001 From: Jay Zhang <36183870+fatcat-z@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:50:42 +0800 Subject: [PATCH 124/124] Refactor CI jobs for adding required jobs in Actions. (#2344) * Add required jobs for Unit test. --------- Signed-off-by: Jay Zhang --- .../actions/keras_application_test/action.yml | 75 ++++++ .github/actions/keras_unit_test/action.yml | 53 ++++ .github/actions/prepare_env/action.yml | 53 ---- .../actions/pretrained_model_test/action.yml | 46 ++++ .github/actions/unit_test/action.yml | 62 +++++ .../workflows/keras_application_test_ci.yml | 232 ++++++------------ .github/workflows/keras_unit_test_ci.yml | 197 ++++++--------- .../workflows/pretrained_model_test_ci.yml | 139 +++++++++++ .../workflows/pretrained_model_tests_ci.yml | 99 -------- .github/workflows/pylint.yml | 2 +- .github/workflows/unit_test_ci.yml | 140 +++++++++++ .github/workflows/unit_tests_ci.yml | 124 ---------- 12 files changed, 675 insertions(+), 547 deletions(-) create mode 100644 .github/actions/keras_application_test/action.yml create mode 100644 .github/actions/keras_unit_test/action.yml delete mode 100644 .github/actions/prepare_env/action.yml create mode 100644 .github/actions/pretrained_model_test/action.yml create mode 100644 .github/actions/unit_test/action.yml create mode 100644 .github/workflows/pretrained_model_test_ci.yml delete mode 100644 .github/workflows/pretrained_model_tests_ci.yml create mode 100644 .github/workflows/unit_test_ci.yml delete mode 100644 .github/workflows/unit_tests_ci.yml diff --git a/.github/actions/keras_application_test/action.yml b/.github/actions/keras_application_test/action.yml new file mode 100644 index 000000000..7148e417b --- /dev/null +++ b/.github/actions/keras_application_test/action.yml @@ -0,0 +1,75 @@ +name: Keras2onnx Application Test Run + +inputs: + tf_version: + description: 'TensorFlow version' + python_version: + description: 'Python version' + ort_version: + description: 'ONNXRuntime version' + onnx_version: + description: 'ONNX version' + +runs: + using: "composite" + steps: + - name: Set up Python (${{ inputs.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Install dependencies (TF-v${{ inputs.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ inputs.onnx_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ inputs.tf_version }} + pip install onnxruntime==${{ inputs.ort_version }} + pip install Pillow==8.2.0 + pip install opencv-python + pip install tqdm + pip install keras-segmentation==0.2.0 + git clone https://github.com/matterport/Mask_RCNN + cd Mask_RCNN + pip install -r requirements.txt + python setup.py install + cd .. + pip install matplotlib + git clone https://github.com/qqwweee/keras-yolo3 + pip install keras-resnet + pip install git+https://www.github.com/keras-team/keras-contrib.git + pip install keras-tcn==2.8.3 + pip install git+https://github.com/qubvel/efficientnet + pip install keras-self-attention + pip install pytest pytest-cov pytest-runner + + if [[ ${{ inputs.tf_version }} == 1.* ]]; then + pip install keras==2.3.1 + pip install transformers==4.2.0 + pip uninstall -y h5py + pip install h5py==2.9.0 + pip install numpy==1.19.0 + else + pip install transformers + pip install "numpy<2" + fi + + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras_application_test (${{ runner.os }}) + shell: bash + run: | + python -c "import onnxruntime" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + cd tests/keras2onnx_applications/nightly_build + python run_all_v2.py diff --git a/.github/actions/keras_unit_test/action.yml b/.github/actions/keras_unit_test/action.yml new file mode 100644 index 000000000..4c78945f1 --- /dev/null +++ b/.github/actions/keras_unit_test/action.yml @@ -0,0 +1,53 @@ +name: Keras2onnx Unit Test Run + +inputs: + tf_version: + description: 'TensorFlow version' + python_version: + description: 'Python version' + ort_version: + description: 'ONNXRuntime version' + onnx_version: + description: 'ONNX version' + +runs: + using: "composite" + steps: + - name: Set up Python (${{ inputs.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Install dependencies (TF-v${{ inputs.tf_version }}) + shell: bash + run: | + python -m pip install --upgrade pip + pip install onnxconverter-common + pip install onnx==${{ inputs.onnx_version }} + pip install h5py==3.7.0 + pip install parameterized + pip install timeout-decorator + pip install coloredlogs flatbuffers + pip install tensorflow==${{ inputs.tf_version }} + pip install pytest pytest-cov pytest-runner + pip install onnxruntime==${{ inputs.ort_version }} + pip uninstall -y protobuf + pip install "protobuf~=3.20" + if [[ ${{ inputs.tf_version }} == 1.* ]]; then + pip install numpy==1.19.0 + else + pip install "numpy<2" + fi + + pip install -e . + + echo "----- List all of depdencies:" + pip freeze --all + + - name: Run keras_unit_test (Linux) + shell: bash + if: runner.os == 'Linux' + run: | + python -c "import onnxruntime" + python -c "import onnxconverter_common" + pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml diff --git a/.github/actions/prepare_env/action.yml b/.github/actions/prepare_env/action.yml deleted file mode 100644 index 8d54be491..000000000 --- a/.github/actions/prepare_env/action.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Prepare Environment. - -on: - workflow_call: - inputs: - tf_version: - description: 'TensorFlow version' - required: true - type: string - -jobs: - setup: - runs-on: ubuntu-latest - env: - tensorflow_version: ${{ github.event.inputs.tf_version }} - steps: - - name: Checkout code - uses: actions/checkout@v4 - - # - name: Install dependencies (tf ${{ inputs.tf_version }}) - - name: Install dependencies (tf $tensorflow_version) - run: | - pip install pytest pytest-cov pytest-runner coverage graphviz requests pyyaml pillow pandas parameterized sympy coloredlogs flatbuffers timeout-decorator - pip install onnx - pip install onnxruntime==1.16.3 - pip install numpy - - pip install onnxruntime-extensions - # pip install "tensorflow-text<=${{ inputs.tf_version }}" - pip install "tensorflow-text<=$tensorflow_version" - - pip uninstall -y tensorflow - # pip install tensorflow==${{ inputs.tf_version }} - pip install tensorflow==$tensorflow_version - pip uninstall -y protobuf - pip install "protobuf~=3.20" - - python setup.py install - - pip freeze --all - - - name: Fix Paths (Windows only) - if: runner.os == 'Windows' - run: | - $site_dir = python -c "import site; print(site.getsitepackages()[1])" - echo "##vso[task.prependpath]$site_dir\numpy\.libs" - $base_dir = python -c "import site; print(site.getsitepackages()[0])" - echo "##vso[task.prependpath]$base_dir/Library/bin" - - - name: List all dependencies - run: | - pip list - diff --git a/.github/actions/pretrained_model_test/action.yml b/.github/actions/pretrained_model_test/action.yml new file mode 100644 index 000000000..f6d69d99a --- /dev/null +++ b/.github/actions/pretrained_model_test/action.yml @@ -0,0 +1,46 @@ +name: Pretrained Model Test Run + +inputs: + tf_version: + description: 'TensorFlow version' + python_version: + description: 'Python version' + ort_version: + description: 'ONNXRuntime version' + onnx_version: + description: 'ONNX version' + opset_version: + description: 'OPSET version' + skip_tflite: + description: 'Skip TFLite tests' + +runs: + using: "composite" + steps: + - name: Set up Python (${{ inputs.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Install dependencies (TF-v${{ inputs.tf_version }}) + shell: bash + run: | + chmod +x ./tests/utils/setup_test_env.sh + ./tests/utils/setup_test_env.sh ${{ inputs.tf_version }} ${{ inputs.ort_version }} ${{ inputs.onnx_version }} + + - name: Fix Paths (Windows only) + shell: pwsh + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" + + - name: Run pretrained_model_test + shell: bash + run: | + # TODO: fix unity model path + # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? + python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ inputs.opset_version }} --skip_tf_tests False --skip_tflite_tests ${{ inputs.skip_tflite }} --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? + ls diff --git a/.github/actions/unit_test/action.yml b/.github/actions/unit_test/action.yml new file mode 100644 index 000000000..00cb28386 --- /dev/null +++ b/.github/actions/unit_test/action.yml @@ -0,0 +1,62 @@ +name: Unit Test Run + +inputs: + tf_version: + description: 'TensorFlow version' + python_version: + description: 'Python version' + ort_version: + description: 'ONNXRuntime version' + onnx_version: + description: 'ONNX version' + opset_version: + description: 'OPSET version' + skip_tflite: + description: 'Skip TFLite tests' + +runs: + using: "composite" + steps: + - name: Set up Python (${{ inputs.python_version }}) + uses: actions/setup-python@v5 + with: + python-version: ${{ inputs.python_version }} + + - name: Install dependencies (TF-v${{ inputs.tf_version }}) + shell: bash + run: | + chmod +x ./tests/utils/setup_test_env.sh + ./tests/utils/setup_test_env.sh ${{ inputs.tf_version }} ${{ inputs.ort_version }} ${{ inputs.onnx_version }} + + - name: Fix Paths (Windows only) + shell: pwsh + if: runner.os == 'Windows' + run: | + $site_dir = python -c "import site; print(site.getsitepackages()[1])" + echo "##vso[task.prependpath]$site_dir\numpy\.libs" + $base_dir = python -c "import site; print(site.getsitepackages()[0])" + echo "##vso[task.prependpath]$base_dir/Library/bin" + + - name: Run unit_test (Linux) + shell: bash + if: runner.os == 'Linux' + run: | + export TF2ONNX_TEST_BACKEND=onnxruntime + export TF2ONNX_TEST_OPSET=${{ inputs.opset_version }} + export TF2ONNX_SKIP_TFLITE_TESTS=${{ inputs.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 + ls + + - name: Run unit_test (Windows) + shell: pwsh + if: runner.os == 'Windows' + run: | + set TF2ONNX_TEST_BACKEND=onnxruntime + set TF2ONNX_TEST_OPSET=${{ inputs.opset_version }} + set TF2ONNX_SKIP_TFLITE_TESTS=${{ inputs.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 + ls diff --git a/.github/workflows/keras_application_test_ci.yml b/.github/workflows/keras_application_test_ci.yml index 1e4554f88..c962b1dc8 100644 --- a/.github/workflows/keras_application_test_ci.yml +++ b/.github/workflows/keras_application_test_ci.yml @@ -14,172 +14,119 @@ concurrency: cancel-in-progress: true jobs: - run_tests: + + Test_min_py_with_min_tf: # Do not change this name because it is used in Ruleset of this repo. strategy: fail-fast: false - matrix: - 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.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: ubuntu-latest - runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py38-TF2.9) + uses: ./.github/actions/keras_application_test + with: + tf_version: '2.9.0' + python_version: '3.8' + ort_version: '1.16.3' + onnx_version: '1.16.1' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py38-TF2.9-ubuntu) + path: ./**/test-results-*.xml + + Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py310-TF2.15) + uses: ./.github/actions/keras_application_test + with: + tf_version: '2.15.0' + python_version: '3.10' + ort_version: '1.16.3' + onnx_version: '1.16.1' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 with: - python-version: ${{ matrix.python_version }} + name: Test Results (Py310-TF2.15-ubuntu) + path: ./**/test-results-*.xml + Test_py37_with_tf1_15: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (TF-v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install onnxruntime==${{ matrix.ort_version }} - pip install Pillow==8.2.0 - pip install opencv-python - pip install tqdm - pip install keras-segmentation==0.2.0 - git clone https://github.com/matterport/Mask_RCNN - cd Mask_RCNN - pip install -r requirements.txt - python setup.py install - cd .. - pip install matplotlib - git clone https://github.com/qqwweee/keras-yolo3 - pip install keras-resnet - pip install git+https://www.github.com/keras-team/keras-contrib.git - pip install keras-tcn==2.8.3 - pip install git+https://github.com/qubvel/efficientnet - 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 . - - echo "----- List all of depdencies:" - pip freeze --all - - - name: Run keras application tests (${{ matrix.os }}) - run: | - python -c "import onnxruntime" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - cd tests/keras2onnx_applications/nightly_build - python run_all_v2.py + - name: Run Tests (Py37-TF1.15) + uses: ./.github/actions/keras_application_test + with: + tf_version: '1.15.5' + python_version: '3.7' + ort_version: '1.14.1' + onnx_version: '1.14.1' - name: Upload Test Results if: always() uses: actions/upload-artifact@v3 with: - name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: ./**/test-results*.xml + name: Test Results (Py37-TF1.15-ubuntu) + path: ./**/test-results-*.xml - run_tests_tf_15: + Extra_tests: strategy: + fail-fast: false matrix: - tf_version: ['1.15.0'] - python_version: ['3.7'] # Max version that supports tf 1.15 - opset_version: ['18', '15'] - ort_version: ['1.14.1'] # Max version that supports python 3.7 - onnx_version: ['1.14.1'] # Max version that supports python 3.7 + name: + - 'py39-tf2.10' + - 'py39-tf2.15' os: ['ubuntu-latest', 'windows-2022'] - + ort_version: ['1.16.3'] + onnx_version: ['1.16.1'] + include: + - 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 }} steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (TF-v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install keras==2.3.1 - pip install onnxruntime==${{ matrix.ort_version }} - pip install Pillow==8.2.0 - pip install opencv-python - pip install tqdm - pip install keras-segmentation==0.2.0 - git clone https://github.com/matterport/Mask_RCNN - cd Mask_RCNN - pip install -r requirements.txt - python setup.py install - cd .. - pip install matplotlib - git clone https://github.com/qqwweee/keras-yolo3 - pip install keras-resnet - pip install git+https://www.github.com/keras-team/keras-contrib.git - pip install keras-tcn==2.8.3 - pip install git+https://github.com/qubvel/efficientnet - pip install transformers==4.2.0 - pip install keras-self-attention - pip install pytest pytest-cov pytest-runner - pip install numpy==1.19.0 - pip install h5py==2.9.0 - - pip install -e . - - echo "----- List all of depdencies:" - pip freeze --all - - - name: Run keras application tests (${{ matrix.os }}) - run: | - python -c "import onnxruntime" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - cd tests/keras2onnx_applications/nightly_build - python run_all_v2.py --exclude "test_keras_applications_v2.py" - + - name: Run Tests (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.ort_version }}) + uses: ./.github/actions/keras_application_test + with: + tf_version: ${{ matrix.tf_version }} + python_version: ${{ matrix.python_version }} + ort_version: ${{ matrix.ort_version }} + onnx_version: ${{ matrix.onnx_version }} - name: Upload Test Results if: always() uses: actions/upload-artifact@v3 with: - name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + name: Test Results (${{ matrix.python_version }}-${{ matrix.tf_version }}-${{ matrix.os }}) path: ./**/test-results*.xml publish-test-results: name: "Publish Tests Results to Github" - needs: run_tests + needs: [Test_min_py_with_min_tf, Test_max_py_with_latest_tf, Test_py37_with_tf1_15, Extra_tests] runs-on: ubuntu-latest permissions: checks: write @@ -195,22 +142,3 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: "artifacts/**/*.xml" - - publish-test-results-tf-15: - name: "Publish Tests Results(TF15) to Github" - needs: run_tests_tf_15 - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: write - if: always() - steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/keras_unit_test_ci.yml b/.github/workflows/keras_unit_test_ci.yml index d3adb640c..7ef38d79a 100644 --- a/.github/workflows/keras_unit_test_ci.yml +++ b/.github/workflows/keras_unit_test_ci.yml @@ -14,138 +14,118 @@ concurrency: cancel-in-progress: true jobs: - run_tests: + Test_min_py_with_min_tf: # Do not change this name because it is used in Ruleset of this repo. strategy: fail-fast: false - matrix: - 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.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: ubuntu-latest - runs-on: ${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py38-TF2.9) + uses: ./.github/actions/keras_unit_test + with: + tf_version: '2.9.0' + python_version: '3.8' + ort_version: '1.16.3' + onnx_version: '1.16.1' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py38-TF2.9-ubuntu) + path: ./**/test-results-*.xml + + Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py310-TF2.15) + uses: ./.github/actions/keras_unit_test with: - python-version: ${{ matrix.python_version }} + tf_version: '2.15.0' + python_version: '3.10' + ort_version: '1.16.3' + onnx_version: '1.16.1' + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py310-TF2.15-ubuntu) + path: ./**/test-results-*.xml + + Test_py37_with_tf1_15: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (TF-v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install pytest pytest-cov pytest-runner - 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:" - pip freeze --all - - - name: Run keras unit tests (${{ matrix.os }}) - run: | - python -c "import onnxruntime" - python -c "import onnxconverter_common" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml + - name: Run Tests (Py37-TF1.15) + uses: ./.github/actions/keras_unit_test + with: + tf_version: '1.15.5' + python_version: '3.7' + ort_version: '1.14.1' + onnx_version: '1.14.1' - name: Upload Test Results if: always() uses: actions/upload-artifact@v3 with: - name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: ./**/test-results*.xml + name: Test Results (Py37-TF1.15-ubuntu) + path: ./**/test-results-*.xml - run_tests_tf_15: + Extra_tests: strategy: + fail-fast: false matrix: - tf_version: ['1.15.0'] - python_version: ['3.7'] # Max version that supports tf 1.15 - opset_version: ['18', '15'] - ort_version: ['1.14.1'] # Max version that supports python 3.7 - onnx_version: ['1.14.1'] # Max version that supports python 3.7 + name: + - 'py39-tf2.10' + - 'py39-tf2.15' os: ['ubuntu-latest', 'windows-2022'] - + ort_version: ['1.16.3'] + onnx_version: ['1.16.1'] + include: + - 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 }} steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - name: Checkout code uses: actions/checkout@v4 - - name: Install dependencies (tf v${{ matrix.tf_version }}) - shell: bash - run: | - python -m pip install --upgrade pip - pip install onnxconverter-common - pip install onnx==${{ matrix.onnx_version }} - pip uninstall -y protobuf - pip install "protobuf~=3.20" - pip install h5py==3.7.0 - pip install parameterized - pip install timeout-decorator - pip install coloredlogs flatbuffers - pip install tensorflow==${{ matrix.tf_version }} - pip install pytest pytest-cov pytest-runner - pip install onnxruntime==${{ matrix.ort_version }} - pip install numpy==1.19.0 - pip install -e . - - echo "----- List all of depdencies:" - pip freeze --all - - - name: Run keras unit tests (${{ matrix.os }}) - run: | - python -c "import onnxruntime" - python -c "import onnxconverter_common" - pytest tests/keras2onnx_unit_tests --doctest-modules --junitxml=junit/test-results.xml - + - name: Run Tests (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.ort_version }}) + uses: ./.github/actions/keras_unit_test + with: + tf_version: ${{ matrix.tf_version }} + python_version: ${{ matrix.python_version }} + ort_version: ${{ matrix.ort_version }} + onnx_version: ${{ matrix.onnx_version }} - name: Upload Test Results if: always() uses: actions/upload-artifact@v3 with: - name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) + name: Test Results (${{ matrix.python_version }}-${{ matrix.tf_version }}-${{ matrix.os }}) path: ./**/test-results*.xml - publish-test-results: name: "Publish Tests Results to Github" - needs: run_tests + needs: [Test_min_py_with_min_tf, Test_max_py_with_latest_tf, Test_py37_with_tf1_15, Extra_tests] runs-on: ubuntu-latest permissions: checks: write @@ -161,22 +141,3 @@ jobs: uses: EnricoMi/publish-unit-test-result-action@v2 with: files: "artifacts/**/*.xml" - - publish-test-results-tf-15: - name: "Publish Tests Results(TF15) to Github" - needs: run_tests_tf_15 - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: write - if: always() - steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/pretrained_model_test_ci.yml b/.github/workflows/pretrained_model_test_ci.yml new file mode 100644 index 000000000..e82968fc3 --- /dev/null +++ b/.github/workflows/pretrained_model_test_ci.yml @@ -0,0 +1,139 @@ +name: Pretrained Model Test (CI) + +on: + pull_request: + branches: + - main + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + + Test_min_py_with_min_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py38-TF2.9-18) + uses: ./.github/actions/pretrained_model_test + with: + os: 'ubuntu-latest' + tf_version: '2.9.0' + python_version: '3.8' + ort_version: '1.16.3' + onnx_version: '1.16.1' + opset_version: '18' + skip_tflite: 'False' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py38-TF2.9-18-ubuntu) + path: ./**/test-results-*.xml + + Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py310-TF2.15-18) + uses: ./.github/actions/pretrained_model_test + with: + os: 'ubuntu-latest' + tf_version: '2.15.0' + python_version: '3.10' + ort_version: '1.16.3' + onnx_version: '1.16.1' + opset_version: '18' + skip_tflite: 'False' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py310-TF2.15-18-ubuntu) + path: ./**/test-results-*.xml + + Extra_tests: + strategy: + fail-fast: false + matrix: + name: + - 'py38-tf2.13' + - 'py39-tf2.15' + os: ['ubuntu-latest', 'windows-2022'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + onnx_version: ['1.16.1'] + skip_tflite: ['False'] + include: + - name: 'py38-tf2.13' + tf_version: '2.13.0' + python_version: '3.8' + - name: 'py39-tf2.15' + tf_version: '2.15.0' + python_version: '3.9' + - 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 + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.opset_version }}_${{ matrix.ort_version }}_${{ matrix.skip_tflite }}) + uses: ./.github/actions/pretrained_model_test + with: + tf_version: ${{ matrix.tf_version }} + python_version: ${{ matrix.python_version }} + ort_version: ${{ matrix.ort_version }} + onnx_version: ${{ matrix.onnx_version }} + opset_version: ${{ matrix.opset_version }} + skip_tflite: ${{ matrix.skip_tflite }} + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.opset_version }}_${{ matrix.ort_version }}_${{ matrix.skip_tflite }}) + path: ./**/test-results-*.xml + + publish-test-results: + name: "Publish Tests Results to Github" + needs: [Test_min_py_with_min_tf, Test_max_py_with_latest_tf, Extra_tests] + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "**/pytest*.xml" \ No newline at end of file diff --git a/.github/workflows/pretrained_model_tests_ci.yml b/.github/workflows/pretrained_model_tests_ci.yml deleted file mode 100644 index cc3826c69..000000000 --- a/.github/workflows/pretrained_model_tests_ci.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: Pretrained Model Test (CI) - -on: - pull_request: - branches: - - main - push: - branches: - - 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: - 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 - - steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies (TF-v${{ matrix.tf_version }}) - shell: bash - run: | - chmod +x ./tests/utils/setup_test_env.sh - ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }} - - - name: Fix Paths (Windows only) - if: runner.os == 'Windows' - run: | - $site_dir = python -c "import site; print(site.getsitepackages()[1])" - echo "##vso[task.prependpath]$site_dir\numpy\.libs" - $base_dir = python -c "import site; print(site.getsitepackages()[0])" - echo "##vso[task.prependpath]$base_dir/Library/bin" - - - name: Run pretrained_model_test - run: | - # TODO: fix unity model path - # python tests/run_pretrained_models.py --backend $CI_ONNX_BACKEND --opset $CI_ONNX_OPSET --config tests/unity.yaml || status=$? - python tests/run_pretrained_models.py --backend onnxruntime --opset ${{ matrix.opset_version }} --skip_tf_tests False --skip_tflite_tests False --skip_tfjs_tests True --config tests/run_pretrained_models.yaml || status=$? - ls - - # publish-test-results: - # name: "Publish Tests Results to Github" - # needs: run_tests - # runs-on: ubuntu-latest - # permissions: - # checks: write - # pull-requests: write - # if: always() - # steps: - # - name: Download Artifacts - # uses: actions/download-artifact@v3 - # with: - # path: artifacts - - # - name: Publish Test Results - # uses: EnricoMi/publish-unit-test-result-action@v2 - # with: - # files: "**/pytest*.xml" \ No newline at end of file diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 6586126ea..ac5631aa3 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -9,7 +9,7 @@ on: - main jobs: - pylint: + enforce-style: runs-on: ubuntu-latest steps: - name: Checkout code diff --git a/.github/workflows/unit_test_ci.yml b/.github/workflows/unit_test_ci.yml new file mode 100644 index 000000000..1dcbef980 --- /dev/null +++ b/.github/workflows/unit_test_ci.yml @@ -0,0 +1,140 @@ +name: Unit Test (CI) + +on: + pull_request: + branches: + - main + push: + branches: + - main + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }} + cancel-in-progress: true + +jobs: + + Test_min_py_with_min_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py38-TF2.9-18) + uses: ./.github/actions/unit_test + with: + os: 'ubuntu-latest' + tf_version: '2.9.0' + python_version: '3.8' + ort_version: '1.16.3' + onnx_version: '1.16.1' + opset_version: '18' + skip_tflite: 'False' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py38-TF2.9-18-ubuntu) + path: ./**/test-results-*.xml + + Test_max_py_with_latest_tf: # Do not change this name because it is used in Ruleset of this repo. + strategy: + fail-fast: false + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py310-TF2.15-18) + uses: ./.github/actions/unit_test + with: + os: 'ubuntu-latest' + tf_version: '2.15.0' + python_version: '3.10' + ort_version: '1.16.3' + onnx_version: '1.16.1' + opset_version: '18' + skip_tflite: 'False' + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py310-TF2.15-18-ubuntu) + path: ./**/test-results-*.xml + + Extra_tests: + strategy: + fail-fast: false + matrix: + name: + - 'py38-tf2.13' + - 'py39-tf2.15' + os: ['ubuntu-latest', 'windows-2022'] + opset_version: ['18', '15'] + ort_version: ['1.16.3'] + onnx_version: ['1.16.1'] + skip_tflite: ['False'] + include: + - name: 'py38-tf2.13' + tf_version: '2.13.0' + python_version: '3.8' + - name: 'py39-tf2.15' + tf_version: '2.15.0' + python_version: '3.9' + - 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 }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Run Tests (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.opset_version }}_${{ matrix.ort_version }}_${{ matrix.skip_tflite }}) + uses: ./.github/actions/unit_test + with: + tf_version: ${{ matrix.tf_version }} + python_version: ${{ matrix.python_version }} + ort_version: ${{ matrix.ort_version }} + onnx_version: ${{ matrix.onnx_version }} + opset_version: ${{ matrix.opset_version }} + skip_tflite: ${{ matrix.skip_tflite }} + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v3 + with: + name: Test Results (Py${{ matrix.python_version }}_TF${{ matrix.tf_version }}_${{ matrix.os }}_${{ matrix.opset_version }}_${{ matrix.ort_version }}_${{ matrix.skip_tflite }}) + path: ./**/test-results-*.xml + + publish-test-results: + name: "Publish Tests Results to Github" + needs: [Test_min_py_with_min_tf, Test_max_py_with_latest_tf, Extra_tests] + runs-on: ubuntu-latest + permissions: + checks: write + pull-requests: write + if: always() + steps: + - name: Download Artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + with: + files: "artifacts/**/*.xml" \ No newline at end of file diff --git a/.github/workflows/unit_tests_ci.yml b/.github/workflows/unit_tests_ci.yml deleted file mode 100644 index 6239f8aed..000000000 --- a/.github/workflows/unit_tests_ci.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Unit Test (CI) - -on: - pull_request: - branches: - - main - push: - branches: - - 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: - 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'] - 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 }} - - steps: - - name: Set up Python (${{ matrix.python_version }}) - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python_version }} - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install dependencies (TF-v${{ matrix.tf_version }}) - shell: bash - run: | - chmod +x ./tests/utils/setup_test_env.sh - ./tests/utils/setup_test_env.sh ${{ matrix.tf_version }} ${{ matrix.ort_version }} ${{ matrix.onnx_version }} - - - name: Fix Paths (Windows only) - if: runner.os == 'Windows' - run: | - $site_dir = python -c "import site; print(site.getsitepackages()[1])" - echo "##vso[task.prependpath]$site_dir\numpy\.libs" - $base_dir = python -c "import site; print(site.getsitepackages()[0])" - echo "##vso[task.prependpath]$base_dir/Library/bin" - - - name: Run unit_test (Linux) - if: runner.os == 'Linux' - run: | - export TF2ONNX_TEST_BACKEND=onnxruntime - export TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} - 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 - ls - - - name: Run unit_test (Windows) - if: runner.os == 'Windows' - run: | - set TF2ONNX_TEST_BACKEND=onnxruntime - set TF2ONNX_TEST_OPSET=${{ matrix.opset_version }} - 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 - ls - - - name: Upload Test Results - if: always() - uses: actions/upload-artifact@v3 - with: - name: Test Results (${{ matrix.tf_version }}-${{ matrix.python_version }}-${{ matrix.os }}) - path: ./**/test-results-*.xml - - publish-test-results: - name: "Publish Tests Results to Github" - needs: run_tests - runs-on: ubuntu-latest - permissions: - checks: write - pull-requests: write - if: always() - steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - with: - files: "artifacts/**/*.xml" \ No newline at end of file