Skip to content

fix(ppo): preserve best metric across regular checkpoint resume - #1333

Merged
hijkzzz merged 1 commit into
OpenRLHF:mainfrom
Excelius-Wang:fix/ppo-best-checkpoint-state
Sep 12, 2026
Merged

hijkzzz merged 1 commit into
OpenRLHF:mainfrom
Excelius-Wang:fix/ppo-best-checkpoint-state

Conversation

@Excelius-Wang

Copy link
Copy Markdown
Contributor

Regular PPO checkpoints omit the historical best evaluation metric. Resuming from one resets the best threshold to -inf, so a worse subsequent evaluation can be saved as the new best and delete the previous best checkpoint.

Persist best metric key/value in regular checkpoint client state and retain the latest evaluation value separately for checkpoint rotation. The existing restore path accepts older checkpoints using its previous fallback. Both synchronous and asynchronous PPO use these base methods.

Validation: full pytest suite (70 passed), compileall and pre-commit. Regression tests cover save/load, worse and better evaluations, zero/negative metrics and older metadata. A CPU file-system probe ran the actual trainer decisions and strategy checkpoint rotation: the old best survives a worse evaluation after resume and is replaced by a real improvement. Ray transport and DeepSpeed engine serialization were stand-ins; no GPU training was run.

@hijkzzz
hijkzzz merged commit ab2ead3 into OpenRLHF:main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants