Skip to content

Commit aacd5ee

Browse files
fix skipif
1 parent d2fc595 commit aacd5ee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/to_low_precision_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def forward(self, x: torch.Tensor) -> torch.Tensor:
4343

4444

4545
@pytest.mark.cpu
46-
@pytest.mark.skipif(not MIN_TORCH_2_1)
46+
@pytest.mark.skipif(not MIN_TORCH_2_1, reason="requires PyTorch 2.1+")
4747
def test_to_low_precision_default_preserves_embedding_and_rope_buffers():
4848
model = TinyLM()
4949
to_low_precision(model, dtype=torch.bfloat16)
@@ -63,7 +63,7 @@ def test_to_low_precision_default_preserves_embedding_and_rope_buffers():
6363

6464

6565
@pytest.mark.cpu
66-
@pytest.mark.skipif(not MIN_TORCH_2_1)
66+
@pytest.mark.skipif(not MIN_TORCH_2_1, reason="requires PyTorch 2.1+")
6767
def test_to_low_precision_custom_fp32_modules_only_layernorm():
6868
model = TinyLM()
6969
# Only keep LayerNorm in FP32; embeddings should be cast to low precision now
@@ -80,7 +80,7 @@ def test_to_low_precision_custom_fp32_modules_only_layernorm():
8080

8181

8282
@pytest.mark.cpu
83-
@pytest.mark.skipif(not MIN_TORCH_2_1)
83+
@pytest.mark.skipif(not MIN_TORCH_2_1, reason="requires PyTorch 2.1+")
8484
def test_to_low_precision_disable_rope_keywords_casts_rope_buffers():
8585
model = TinyLM()
8686
# Disable RoPE keyword preservation; buffers should be cast
@@ -94,7 +94,7 @@ def test_to_low_precision_disable_rope_keywords_casts_rope_buffers():
9494

9595

9696
@pytest.mark.cpu
97-
@pytest.mark.skipif(not MIN_TORCH_2_1)
97+
@pytest.mark.skipif(not MIN_TORCH_2_1, reason="requires PyTorch 2.1+")
9898
def test_to_low_precision_fp32_buffers_accepts_module_types():
9999
model = TinyLM()
100100

0 commit comments

Comments
 (0)