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 ab2f4b7 commit a5f40c9Copy full SHA for a5f40c9
avg_checkpoints.py
@@ -47,7 +47,7 @@ def checkpoint_metric(checkpoint_path):
47
if not checkpoint_path or not os.path.isfile(checkpoint_path):
48
return {}
49
print("=> Extracting metric from checkpoint '{}'".format(checkpoint_path))
50
- checkpoint = torch.load(checkpoint_path, map_location='cpu')
+ checkpoint = torch.load(checkpoint_path, map_location='cpu', weights_only=False)
51
metric = None
52
if 'metric' in checkpoint:
53
metric = checkpoint['metric']
0 commit comments