Skip to content

Commit 07d3676

Browse files
authored
weights_only=False (tinygrad#8839)
1 parent 741bbc9 commit 07d3676

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/unit/test_disk_tensor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def compare_weights_both(url):
1010
import torch
1111
fn = fetch(url)
1212
tg_weights = get_state_dict(torch_load(fn))
13-
torch_weights = get_state_dict(torch.load(fn, map_location=torch.device('cpu'), weights_only=True), tensor_type=torch.Tensor)
13+
torch_weights = get_state_dict(torch.load(fn, map_location=torch.device('cpu'), weights_only=False), tensor_type=torch.Tensor)
1414
assert list(tg_weights.keys()) == list(torch_weights.keys())
1515
for k in tg_weights:
1616
if tg_weights[k].dtype == dtypes.bfloat16: tg_weights[k] = torch_weights[k].float() # numpy doesn't support bfloat16

0 commit comments

Comments
 (0)