We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 947f64e commit 167cb5eCopy full SHA for 167cb5e
tests/test_modeling_utils.py
@@ -748,10 +748,7 @@ def test_load_state_dict(self):
748
749
for param, device in device_map.items():
750
device = device if device != "disk" else "cpu"
751
- expected_device = (
752
- torch.device(f"{torch_device}:{device}") if isinstance(device, int) else torch.device(device)
753
- )
754
- assert loaded_state_dict[param].device == expected_device
+ assert loaded_state_dict[param].device == torch.device(device)
755
756
def test_convert_file_size(self):
757
result = convert_file_size_to_int("0MB")
0 commit comments