You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GRPO validation accepts groups that don't match the training request #748
I found a mismatch between the SDK's GRPO checks and its training request format in 0.6.20.
_check_groups accepts interleaved runs such as A1, B1, A2, B2 because each group_id appears twice. The request keeps that order, but only sends group_size=2; it doesn't send the group IDs. Both request models document contiguous groups. Under that contract, the request represents [A1, B1] and [A2, B2] rather than the original task groups.
I reproduced this through four real local rollouts. Task A always scores 1 and task B always scores 0. After interleaving them, both forward and forward_backward accept the batch and send rewards [1, 0, 1, 0]. The SDK also warns that every group has zero reward spread, even though the contiguous groups in the request both contain [1, 0].
There's a related case w/o reordering: omitting group_size is documented to make the whole batch one group, but the warning still splits it by group_id. It reports no gradient for [1, 1, 0, 0].
My local change rejects interleaved keyed groups before HTTP and calculates the warning from the same positional groups as the request. It preserves input order, including the meaning of returned traj_idx values. The existing test treats interleaved groups as valid, so I've updated that expectation explicitly.
Four regression cases fail on the original source. All 11 focused training tests pass w/ the change. The tests use actual local task execution and mock only training HTTP; no hosted training or weight updates were run. This establishes the SDK/request mismatch, not a measured effect on a deployed model. If the service actually recovers groups from trace provenance instead, the documented request contract needs clarifying.
Activity
fix(train): validate GRPO groups the way the training request sends them
fix: grading, training, shutdown and process-guard fixes (hud-evals#758)