Skip to content

Commit 80f27d7

Browse files
authored
[tests] skip instead of returning. (huggingface#11793)
skip instead of returning.
1 parent d3e27e0 commit 80f27d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/models/test_modeling_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2107,7 +2107,7 @@ def test_hotswapping_compiled_model_linear(self, rank0, rank1):
21072107
@parameterized.expand([(11, 11), (7, 13), (13, 7)]) # important to test small to large and vice versa
21082108
def test_hotswapping_compiled_model_conv2d(self, rank0, rank1):
21092109
if "unet" not in self.model_class.__name__.lower():
2110-
return
2110+
pytest.skip("Test only applies to UNet.")
21112111

21122112
# It's important to add this context to raise an error on recompilation
21132113
target_modules = ["conv", "conv1", "conv2"]
@@ -2117,7 +2117,7 @@ def test_hotswapping_compiled_model_conv2d(self, rank0, rank1):
21172117
@parameterized.expand([(11, 11), (7, 13), (13, 7)]) # important to test small to large and vice versa
21182118
def test_hotswapping_compiled_model_both_linear_and_conv2d(self, rank0, rank1):
21192119
if "unet" not in self.model_class.__name__.lower():
2120-
return
2120+
pytest.skip("Test only applies to UNet.")
21212121

21222122
# It's important to add this context to raise an error on recompilation
21232123
target_modules = ["to_q", "conv"]

0 commit comments

Comments
 (0)