Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix new pytorch error #284

Merged
merged 8 commits into from
Aug 14, 2024
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
Loading