From d22382c15ae1057f0a8bbb5b752e876dffff6919 Mon Sep 17 00:00:00 2001 From: IlyasMoutawwakil Date: Mon, 4 Nov 2024 12:07:22 +0100 Subject: [PATCH] fix --- .github/workflows/test_onnxruntime.yml | 25 ++++++++++--------------- tests/onnxruntime/test_quantization.py | 4 ++-- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test_onnxruntime.yml b/.github/workflows/test_onnxruntime.yml index 5d9593ce14f..cd81ce31b12 100644 --- a/.github/workflows/test_onnxruntime.yml +++ b/.github/workflows/test_onnxruntime.yml @@ -2,9 +2,11 @@ name: ONNX Runtime / Python - Test on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -16,20 +18,14 @@ jobs: fail-fast: false matrix: os: [ubuntu-20.04, windows-2019, macos-13] - transformers-version: ["4.45.*", "latest"] - test-pattern: - ["*modeling*", "*diffusion*", "*optimization*", "*quantization*"] + transformers-version: ["latest"] runs-on: ${{ matrix.os }} steps: - - name: Free Disk Space (Ubuntu) - if: matrix.os == 'ubuntu-20.04' + - if: matrix.os == 'ubuntu-20.04' + name: Free Disk Space (Ubuntu) uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - swap-storage: false - large-packages: false - name: Checkout code uses: actions/checkout@v4 @@ -49,13 +45,12 @@ jobs: name: Downgrade Transformers run: pip install transformers==${{ matrix.transformers-version }} - - if: ${{ matrix.test-pattern == '*modeling*' }} - name: Test with pytest (in series) + - name: Test with pytest (in series) run: | - pytest tests/onnxruntime/${{ matrix.test-pattern }} -m "run_in_series" --durations=0 -vvvv -s + pytest tests/onnxruntime -m "run_in_series" --durations=0 -vvvv -s - name: Test with pytest (in parallel) run: | - pytest tests/onnxruntime/${{ matrix.test-pattern }} -m "not run_in_series" --durations=0 -vvvv -s -n auto + pytest tests/onnxruntime -m "not run_in_series" --durations=0 -vvvv -s -n auto env: HF_HUB_READ_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} diff --git a/tests/onnxruntime/test_quantization.py b/tests/onnxruntime/test_quantization.py index b6f1ebb70f6..a0f9d91c38b 100644 --- a/tests/onnxruntime/test_quantization.py +++ b/tests/onnxruntime/test_quantization.py @@ -41,10 +41,10 @@ class ORTQuantizerTest(unittest.TestCase): LOAD_CONFIGURATION = { "local_asset": { - "model_or_path": "assets/onnx", + "model_or_path": "tests/assets/onnx", }, "local_asset_different_name": { - "model_or_path": "assets/onnx", + "model_or_path": "tests/assets/onnx", "file_name": "different_name.onnx", }, "ort_model_class": {