Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/prime_rl/orchestrator/ckpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def load_from_path(self, ckpt_path: Path, progress: Progress, buffer: Buffer) ->
self.logger.info("Skipping progress loading from checkpoint")
else:
with open(ckpt_path / "progress.pt", "rb") as f:
state = torch.load(f, weights_only=False)
state = torch.load(f, weights_only=True)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safe load breaks progress resume

High Severity

load_from_path now calls torch.load with weights_only=True, but save_to_path still writes progress.pt via torch.save containing a live Progress dataclass instance. Restricted unpickling does not allow that custom type unless it is explicitly allowlisted, so resuming orchestrator checkpoints (when progress loading is not skipped) is likely to fail at load time.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit f322a5f. Configure here.


# Set progress in-place
for key, value in asdict(state["progress"]).items():
Expand Down