Skip to content

Commit

Permalink
Merge branch 'main' into refactor2
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby authored Oct 21, 2024
2 parents 1600602 + 1cf117e commit a9486f7
Show file tree
Hide file tree
Showing 34 changed files with 168 additions and 41 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/link_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
link-checker:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/run_keras_sony_custom_layers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tensorflow-tests:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/run_pytorch_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,3 @@ jobs:
run: |
pytest tests_pytest/pytorch
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_keras212.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_keras213.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_keras214.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_keras215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_pytorch20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_pytorch21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_pytorch22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_pytorch23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python310_pytorch24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_keras212.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_keras213.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_keras214.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_keras215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_pytorch20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_pytorch21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_pytorch22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_pytorch23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python311_pytorch24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_keras212.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_keras213.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_keras214.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_keras215.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_pytorch20.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_pytorch21.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_pytorch22.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_pytorch23.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run_tests_python39_pytorch24.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
run-tests:
Expand Down
57 changes: 44 additions & 13 deletions .github/workflows/run_tests_suite_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,33 +23,60 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install dependencies

- name: Set up Coverage
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
pip install pytest
- name: Prepare TF env
run: pip install tensorflow==2.13.*
- name: Run tensorflow testsuite
run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest tests/test_suite.py -v
- name: Run tensorflow pytest
run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/keras
- name: Prepare Torch env
run: pip uninstall tensorflow -y && pip install torch==2.0.* torchvision onnx onnxruntime onnxruntime-extensions
- name: Set up TensorFlow environment
run: |
python -m venv tf_env
source tf_env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install tensorflow==2.13.* coverage pytest
- name: Run TensorFlow testsuite
run: |
source tf_env/bin/activate
coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest tests/test_suite.py -v
- name: Run TensorFlow pytest
run: |
source torch_env/bin/activate
coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/keras
- name: Set up Pytorch environment
run: |
python -m venv torch_env
source torch_env/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install torch==2.0.* torchvision onnx onnxruntime onnxruntime-extensions coverage pytest
- name: Run torch testsuite
run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest tests/test_suite.py -v
run: |
source torch_env/bin/activate
coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" unittest tests/test_suite.py -v
- name: Run torch pytest
run: coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/pytorch
run: |
source torch_env/bin/activate
coverage run --parallel-mode -m --omit "*__init__.py" --include "model_compression_toolkit/**/*.py" pytest tests_pytest/pytorch
- name: Combine Multiple Coverage Files
run: coverage combine

- name: Run Coverage HTML
run: coverage html -i --directory ./coverage_report_html

- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: |
coverage_report_html
- name: Coverage Report
run: coverage report -i --skip-covered --sort cover --fail-under $COVERAGE_THRESHOLD
4 changes: 4 additions & 0 deletions .github/workflows/tests_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}

jobs:
build:
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit a9486f7

Please sign in to comment.