Skip to content

Commit 25c6ccb

Browse files
committed
skip failing onnx export test for torch<2.8
1 parent d929c05 commit 25c6ccb

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ dev = [
7070
"segment-anything", # for model testing
7171
"tensorflow",
7272
"timm", # for model testing
73-
"torch>=2.8,<3",
73+
"torch>=1.6,<3",
7474
"torchvision>=0.21",
7575
]
7676

tests/test_weight_converters.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def test_pytorch_to_torchscript(any_torch_model, tmp_path):
2727

2828

2929
def test_pytorch_to_onnx(convert_to_onnx, tmp_path):
30+
import torch
31+
32+
if tuple(map(int, torch.__version__.split(".")[:2])) < (2, 8):
33+
pytest.skip("torch>=2.8 is required for sufficient torch dynamo support")
34+
3035
from bioimageio.core import test_model
3136
from bioimageio.core.weight_converters.pytorch_to_onnx import convert
3237

0 commit comments

Comments
 (0)