Skip to content

Commit 12b82cf

Browse files
committed
test_onnx also with multi tensor again
1 parent 80bf0e4 commit 12b82cf

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

tests/conftest.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,15 @@ def any_model(request):
139139
return pytest.model_packages[request.param]
140140

141141

142-
# temporary fixture to test not with all, but only a manual selection of models
142+
#
143+
# temporary fixtures to test not with all, but only a manual selection of models
143144
# (models/functionality should be improved to get rid of this specific model group)
145+
#
144146
@pytest.fixture(params=[] if skip_torch else ["unet2d_nuclei_broad_model", "unet2d_fixed_shape"])
145147
def unet2d_fixed_shape_or_not(request):
146148
return pytest.model_packages[request.param]
149+
150+
151+
@pytest.fixture(params=[] if skip_torch else ["unet2d_nuclei_broad_model", "unet2d_multi_tensor"])
152+
def unet2d_multi_tensor_or_not(request):
153+
return pytest.model_packages[request.param]

tests/weight_converter/torch/test_onnx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44

55
# todo: test with 'any_torch_model'
6-
def test_onnx_converter_from_torch(unet2d_nuclei_broad, tmp_path):
6+
def test_onnx_converter(unet2d_multi_tensor_or_not, tmp_path):
77
from bioimageio.core.weight_converter.torch.onnx import convert_weights_to_onnx
88

99
out_path = tmp_path / "weights.onnx"
10-
ret_val = convert_weights_to_onnx(unet2d_nuclei_broad, out_path, test_decimal=3)
10+
ret_val = convert_weights_to_onnx(unet2d_multi_tensor_or_not, out_path, test_decimal=3)
1111
assert os.path.exists(out_path)
1212
if not pytest.skip_onnx:
1313
assert ret_val == 0 # check for correctness is done in converter and returns 0 if it passes

0 commit comments

Comments
 (0)