Repository navigation
refactor: handle GDPO multi-reward by dict instead of positional list - #2597
Merged
Merged
Conversation
Contributor
Author
|
/ok to test ad88d28 |
Contributor
Author
|
/ok to test ad88d28 |
NolenLiang
force-pushed
the
nliang/gdpo-multi-reward-dict
branch
from
May 28, 2026 09:12
ad88d28 to
4199d0c
Compare
Contributor
Author
|
/ok to test 4199d0c |
NolenLiang
force-pushed
the
nliang/gdpo-multi-reward-dict
branch
from
May 28, 2026 09:42
4199d0c to
cb40d08
Compare
Contributor
Author
|
/ok to test cb40d08 |
Contributor
Author
|
/ok to test ccacc0e |
Contributor
Author
|
/ok to test 4359b1c |
Contributor
Author
|
/ok to test 218f2ed |
yuki-97
reviewed
Jun 24, 2026
Contributor
Author
|
/ok to test 170e6b7 |
Contributor
Author
|
/ok to test 7d995c5 |
Contributor
Author
|
/ok to test 9a152cf |
Contributor
Author
|
/ok to test 536189f |
Contributor
Author
|
/ok to test 7ea141f |
yuki-97
reviewed
Jun 25, 2026
Contributor
Author
|
/ok to test 32a63dd |
Replace positional Tensor[B,K] multi-reward with named dict[str, Tensor] using reward/ prefix (e.g. reward/correctness, reward/integer, reward/format). Changes across 4 layers: - Environment: EnvironmentReturn.rewards supports dict type; HFMultiRewardVerifyWorker returns named reward components - Rollouts: sync/async paths accumulate and discover rewards by name (reward/ prefix) instead of regex reward\d+ - Algorithm: get_gdpo_reward_component_keys() uses prefix matching; GDPOAdvantageEstimator unchanged in logic - Docs & tests updated to match Closes: #2107 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> Signed-off-by: nliang <[email protected]>
Per-prompt rollouts always use single-reward (Tensor), not dict. Add assert to satisfy pyrefly type checker after rewards type changed to Tensor | dict[str, Tensor]. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: nliang <[email protected]>
Leftover from rebase conflict resolution — function is not used in advantage_estimator.py after the multi-reward dict refactor. Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Signed-off-by: nliang <[email protected]>
…ify calculate_rewards Signed-off-by: nliang <[email protected]> Signed-off-by: nliang <[email protected]>
Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: NolenLiang <[email protected]>
Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: NolenLiang <[email protected]>
Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: NolenLiang <[email protected]>
Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: NolenLiang <[email protected]>
Signed-off-by: Nolen Liang <[email protected]>
Signed-off-by: Nolen Liang <[email protected]>
Co-authored-by: Yuki Huang <[email protected]> Signed-off-by: NolenLiang <[email protected]>
Signed-off-by: nliang <[email protected]>
Contributor
Author
|
/ok to test dc986c3 |
Signed-off-by: nliang <[email protected]>
Contributor
Author
|
/ok to test 4a1fe2d |
Signed-off-by: Yuki Huang <[email protected]>
yuki-97
approved these changes
Jun 29, 2026
Contributor
|
/ok to test f2979a6 |
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.
Replace positional Tensor[B,K] multi-reward with named dict[str, Tensor] using reward/ prefix (e.g. reward/correctness, reward/integer, reward/format).
Changes across 4 layers:
Closes: #2107
What does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information