Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Nov 4, 2024
1 parent 093e7c3 commit d22382c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/test_onnxruntime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
4 changes: 2 additions & 2 deletions tests/onnxruntime/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit d22382c

Please sign in to comment.