Skip to content

Commit

Permalink
add torch tests to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
irenaby committed Mar 17, 2024
1 parent 8095261 commit 7924f85
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,43 @@ jobs:
- name: Run pytest
run: |
pytest sony_custom_layers/keras
run-torch-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py_ver: [ "3.8", "3.9", "3.10", "3.11" ]
torch_ver: ["2.2"]
torchvision_ver: ["0.17"] # <0.17 incompatible with torch2.2
include:
- ort_ver: "1.17"
ort_ext_ver: "0.10"
onnx_ver: "1.15"
- ort_ver: "1.12"
ort_ext_ver: "0.8"
onnx_ver: "1.14"

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python 3
uses: actions/setup-python@v4
with:
python-version: ${{matrix.py_ver}}
- name: Install dependencies
run: |
pip install torch==${{matrix.torch_ver}} \
torchvision==${{matrix.torchvision_ver}} \
onnxruntime==${{matrix.ort_ver}} \
onnxruntime_extensions==${{matrix.ort_ext_ver}} \
onnx==${{matrix.onnx_ver}}
pip install -r requirements_test.txt
- name: Run pytest
run: |
pytest sony_custom_layers/pytorch
build:
needs: [run-tf-tests]
needs: [run-tf-tests, run-torch-tests]
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down

0 comments on commit 7924f85

Please sign in to comment.