Carry the rollout id on both agentic paths - #2536
Merged
Merged
Conversation
fzyzcjy
requested review from
Shi-Dong,
guapisolo and
yueming-yuan
as code owners
August 14, 2026 02:50
The rollout id is stamped on the v2 branch only, so a v1 sample keeps None where its v2 counterpart gets the index. tests/e2e/sglang/ test_session_v1_v2_parity.py compares every field of the training payload, so the two paths can never agree on sample.rollout_id. Hoist the derivation out of the branch. v2 behaviour is unchanged -- the assertion still guards only that path -- and v1 now stamps the same value whenever it is derivable, keeping the old behaviour when it is not.
guapisolo
force-pushed
the
tom/fix-agentic-rollout-id-parity
branch
from
August 14, 2026 03:14
8853230 to
20721de
Compare
Only multi-sample v2 results need a shared rollout ID. Keeping singleton IDs unset prevents postprocessing from treating ordinary rollouts as compact and preserves normal trimming and dynamic batch metadata.
Collaborator
|
Rebased fix direction after #2347: this branch now keeps This preserves ordinary postprocessing, including sample-count trimming and dynamic-global-batch metadata, while retaining v2 leaf grouping. Focused verification passed: The PR description still describes the superseded v1-stamping approach; this comment records the final behavior instead. |
guapisolo
approved these changes
Aug 14, 2026
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.
What breaks
tests/e2e/sglang/test_session_v1_v2_parity.py::test_qwen3_8b_h200_fa3_agentic_v2_drop_retries_matches_v1_training_payload_bitwisefails onmain:mainreproduces it: 31715141995 →stage-c-2-gpu-h200 (0),Test Summary: 4/5 passed.Root cause
miles/rollout/generate_hub/agentic_tool_call.pystamps the rollout id only on the v2 branch:sample.rollout_idatNonewhile v2 sets it to the index. The parity test compares every field of the training payload, so the two paths are structurally unable to agree on this one.test(session): validate H200 v1/v2 agentic parityfix(rollout): group session v2 leaf samplessample.rollout_idstampingThe fix
rollout_idis non-Nonethere by construction, so the newifis always taken.rollout_idnorindexis set, v1 keeps its current behaviour rather than acquiring a new failure mode.Evidence
6033ac0eaf, turns that lane green:stage-c-2-gpu-h200 (0)went fromEnabled 5 test(s)→4/5 passedtoEnabled 5 test(s)→5/5 passed, running 51 minutes, so it is a real pass rather than a skipped or no-op lane.ruff check miles/rollout/generate_hub/agentic_tool_call.pypasses.Note for reviewers
if use_v2 and len(samples) > 1:for an unrelated reason. Whichever lands second will need a trivial rebase; the two intents are compatible, since the condition being narrowed there is the stamping loop rather than the derivation.