From 40fc389c446fe81a338546559a6d954d5d7d9680 Mon Sep 17 00:00:00 2001 From: Sayak Paul Date: Thu, 5 Dec 2024 10:13:45 +0530 Subject: [PATCH] [Tests] fix condition argument in xfail. (#10099) * fix condition argument in xfail. * revert init changes. --- tests/lora/test_lora_layers_cogvideox.py | 2 +- tests/lora/test_lora_layers_mochi.py | 2 +- tests/lora/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lora/test_lora_layers_cogvideox.py b/tests/lora/test_lora_layers_cogvideox.py index 623b06621d..15f8ebf450 100644 --- a/tests/lora/test_lora_layers_cogvideox.py +++ b/tests/lora/test_lora_layers_cogvideox.py @@ -129,7 +129,7 @@ class CogVideoXLoRATests(unittest.TestCase, PeftLoraLoaderMixinTests): @skip_mps @pytest.mark.xfail( - condtion=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), + condition=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.", strict=True, ) diff --git a/tests/lora/test_lora_layers_mochi.py b/tests/lora/test_lora_layers_mochi.py index 910b126c14..0a07e3d096 100644 --- a/tests/lora/test_lora_layers_mochi.py +++ b/tests/lora/test_lora_layers_mochi.py @@ -108,7 +108,7 @@ class MochiLoRATests(unittest.TestCase, PeftLoraLoaderMixinTests): return noise, input_ids, pipeline_inputs @pytest.mark.xfail( - condtion=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), + condition=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.", strict=True, ) diff --git a/tests/lora/utils.py b/tests/lora/utils.py index d8dc86d570..474c311505 100644 --- a/tests/lora/utils.py +++ b/tests/lora/utils.py @@ -1513,7 +1513,7 @@ class PeftLoraLoaderMixinTests: @skip_mps @pytest.mark.xfail( - condtion=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), + condition=torch.device(torch_device).type == "cpu" and is_torch_version(">=", "2.5"), reason="Test currently fails on CPU and PyTorch 2.5.1 but not on PyTorch 2.4.1.", strict=True, )