Skip to content

Commit 4446730

Browse files
committed
Fix torch for minimum tests
1 parent 10993bb commit 4446730

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/models/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import torch
88
import segmentation_models_pytorch as smp
99

10-
from tests.utils import has_timm_test_models, slow_test
10+
from tests.utils import has_timm_test_models, slow_test, requires_torch_greater_or_equal
1111

1212

1313
class BaseModelTester(unittest.TestCase):
@@ -172,6 +172,7 @@ def test_save_load_with_hub_mixin(self):
172172
self.assertIn("my_awesome_metric", readme)
173173

174174
@slow_test
175+
@requires_torch_greater_or_equal("2.0.0")
175176
def test_preserve_forward_output(self):
176177
from huggingface_hub import hf_hub_download
177178

0 commit comments

Comments
 (0)