Skip to content

Commit 88d289a

Browse files
committed
add skip back
1 parent 1117427 commit 88d289a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/pipelines/test_pipelines_common.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1201,6 +1201,7 @@ def test_components_function(self):
12011201
self.assertTrue(hasattr(pipe, "components"))
12021202
self.assertTrue(set(pipe.components.keys()) == set(init_components.keys()))
12031203

1204+
@unittest.skipIf(torch_device="cpu", reason="float16 requires a hardware accelerator")
12041205
def test_float16_inference(self, expected_max_diff=5e-2):
12051206
components = self.get_dummy_components()
12061207
pipe = self.pipeline_class(**components)
@@ -1237,6 +1238,7 @@ def test_float16_inference(self, expected_max_diff=5e-2):
12371238
max_diff = np.abs(to_np(output) - to_np(output_fp16)).max()
12381239
self.assertLess(max_diff, expected_max_diff, "The outputs of the fp16 and fp32 pipelines are too different.")
12391240

1241+
@unittest.skipIf(torch_device="cpu", reason="float16 requires a hardware accelerator")
12401242
def test_save_load_float16(self, expected_max_diff=1e-2):
12411243
components = self.get_dummy_components()
12421244
for name, module in components.items():

0 commit comments

Comments
 (0)