Skip to content

Commit

Permalink
fix new pytorch error (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzouink authored Aug 14, 2024
2 parents ccc9882 + 54e60ad commit 9682290
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dacapo/store/local_weights_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@ def retrieve_weights(self, run: str, iteration: int) -> Weights:

weights_name = self.__get_weights_dir(run) / "iterations" / str(iteration)

weights: Weights = torch.load(weights_name, map_location="cpu")
weights: Weights = torch.load(
weights_name, map_location="cpu", weights_only=False
)
if not isinstance(weights, Weights):
# backwards compatibility
weights = Weights(weights["model"], weights["optimizer"])
Expand Down

0 comments on commit 9682290

Please sign in to comment.