Skip to content

Commit 8463c94

Browse files
committed
fix bandit
1 parent 8e51a7e commit 8463c94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/model_converter/model_converter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def load_checkpoint(self, checkpoint_path: Path) -> Dict[str, Any]:
130130
Checkpoint dictionary
131131
"""
132132
try:
133-
checkpoint = torch.load(checkpoint_path, map_location="cpu")
133+
checkpoint = torch.load(checkpoint_path, map_location="cpu", weights_only=True)
134134
self.logger.debug(f"Loaded checkpoint from: {checkpoint_path}")
135135
return checkpoint
136136
except Exception as e:

0 commit comments

Comments
 (0)