Skip tests properly (#31308)

* Skip tests properly

* [test_all]

* Add 'reason' as kwarg for skipTest

* [test_all] Fix up

* [test_all]
This commit is contained in:
amyeroberts
2024-06-26 21:59:08 +01:00
committed by GitHub
parent 1f9f57ab4c
commit 1de7dc7403
254 changed files with 1721 additions and 1298 deletions

View File

@@ -159,11 +159,11 @@ class ModelOutputTester(unittest.TestCase):
)
# TODO: @ydshieh
@unittest.skip("CPU OOM")
@unittest.skip(reason="CPU OOM")
@require_torch
def test_export_serialization(self):
if not is_torch_greater_or_equal_than_2_2:
return
self.skipTest(reason="Export serialization requires torch >= 2.2.0")
model_cls = AlbertForMaskedLM
model_config = model_cls.config_class()