Skip to content

Commit c0f96fe

Browse files
committed
fix
Signed-off-by: Matrix YAO <[email protected]>
1 parent 2ed18b5 commit c0f96fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/hooks/test_group_offloading.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def test_warning_logged_if_group_offloaded_pipe_moved_to_accelerator(self):
217217
self.assertIn(f"The module '{self.model.__class__.__name__}' is group offloaded", cm.output[0])
218218

219219
def test_error_raised_if_streams_used_and_no_accelerator_device(self):
220-
torch_accelerator_module = getattr(torch, torch_device)
220+
torch_accelerator_module = getattr(torch, torch_device, torch.cuda)
221221
original_is_available = torch_accelerator_module.is_available
222222
torch_accelerator_module.is_available = lambda: False
223223
with self.assertRaises(ValueError):

0 commit comments

Comments
 (0)