Skip to content

Commit

Permalink
Specify torchvision version in run_pytorch_tests (#108)
Browse files Browse the repository at this point in the history
Specify torchvision version in run_pytorch_tests and pass the needed version in the workflows that use it.
  • Loading branch information
reuvenperetz authored Dec 31, 2024
1 parent e74c297 commit 8df02cf
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/run_pytorch_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
torch-version:
required: true
type: string
torchvision-version:
required: true
type: string


jobs:
run-pytorch-tests:
Expand All @@ -20,7 +24,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install torch==${{ inputs.torch-version }} torchvision onnx onnxruntime onnxruntime-extensions
pip install torch==${{ inputs.torch-version }} torchvision==${{ inputs.torchvision-version }} onnx onnxruntime onnxruntime-extensions
- name: Run unittests
run: python -m unittest discover tests/pytorch_tests -v

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run_tests_torch2_0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
torch-version: "2.0.*"
torchvision-version: "0.15.*"
1 change: 1 addition & 0 deletions .github/workflows/run_tests_torch2_1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
torch-version: "2.1.*"
torchvision-version: "0.16.*"
1 change: 1 addition & 0 deletions .github/workflows/run_tests_torch2_2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
torch-version: "2.2.*"
torchvision-version: "0.17.*"
1 change: 1 addition & 0 deletions .github/workflows/run_tests_torch2_3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
torch-version: "2.3.*"
torchvision-version: "0.18.*"
1 change: 1 addition & 0 deletions .github/workflows/run_tests_torch2_4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ jobs:
uses: ./.github/workflows/run_pytorch_tests.yml
with:
torch-version: "2.4.*"
torchvision-version: "0.19.*"

0 comments on commit 8df02cf

Please sign in to comment.