Skip to content

Commit

Permalink
🐛scheduler is not weights_only
Browse files Browse the repository at this point in the history
  • Loading branch information
carefree0910 committed Oct 14, 2024
1 parent 193eba9 commit 26ef49e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/learn/pipeline/blocks/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ def load_from(self, folder: TPath) -> None:
schedulers = self.build_optimizers.schedulers
load_kw = dict(weights_only=True, map_location="cpu")
opt_d = torch.load(folder / self.optimizer_file, **load_kw) # type: ignore
sch_d = torch.load(folder / self.scheduler_file, **load_kw) # type: ignore
sch_d = torch.load(folder / self.scheduler_file, map_location="cpu")
for k, states in opt_d.items():
optimizers[k].load_state_dict(states)
for k, states in sch_d.items():
Expand Down

0 comments on commit 26ef49e

Please sign in to comment.