Repository navigation
Count each AsyncGRPO reward function's mean once per scored rollout, as GRPO does - #8250
Open
qgallouedec wants to merge 2 commits into
Open
qgallouedec wants to merge 2 commits into
qgallouedec wants to merge 2 commits into
Conversation
…dropped groups included, as GRPO does
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. Pages changed in this PR: |
…n-per-rollout # Conflicts: # tests/experimental/test_async_grpo_trainer.py # trl/experimental/async_grpo/async_grpo_trainer.py # trl/experimental/async_grpo/async_rollout_worker.py
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #7835, part of #7841.
GRPOTrainerlogsrewards/<func>/meanas each function's mean over the completions it scored:trl/trl/trainer/grpo_trainer.py
Lines 2960 to 2963 in 9507c44
AsyncGRPOTraineraveraged it over training samples instead, so it left out the groups dropped for zero reward std, and a rollout that forks into several samples counted once per sample. With the environment reward test's counters 1, 0, 0, that logs 0.44 where GRPO logs 1/3. It is now counted once per scored rollout, dropped groups included, likereward.Note
Low Risk
Metric/logging semantics only; training loss and advantage logic are unchanged aside from removing duplicate per-sample reward means from traces.
Overview
AsyncGRPO now logs each
rewards/<func>/meanthe same way as GRPO: averaged over scored rollouts (including groups later dropped for zero reward std), not over training samples. Forked conversations that become several rows no longer inflate the mean, and dropped groups are included like the top-levelrewardmetric.The rollout worker accumulates per-function means in
_ratesduring_score_groupand stops attachingrewards/<func>/meanon individualRolloutSamplemetrics (per-samplegroup_stdis unchanged). Trackio rollout traces therefore no longer carry per-function means on each sample. Docs and tests were updated to match.Reviewed by Cursor Bugbot for commit 116041f. Bugbot is set up for automated code reviews on this repo. Configure here.