Repository navigation
Conversation
…-capture receipts The token-capture receipt path marked a row truncated only when the assembled sequence length equalled max_seq_len, so a terminal response ending with incomplete_details.reason=max_output_tokens below that limit escaped overlong_filtering and undercounted truncation metrics. Carry Gym's LinearizedRow.incomplete_reason through finalize_rollout into FinalizedRollout.terminal_incomplete_reason and treat the NVIDIA-NeMo#4491 length exhaustion verdicts (max_output_tokens, length, max_tokens) as truncation in _truncated_flags, alongside the existing length check. Completed, content-filtered, and legacy receipts without the verdict stay non-truncated. Fixes NVIDIA-NeMo#4737 Signed-off-by: Muse <[email protected]>
Author
|
/ok to test 67b4717 |
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.
What and why
The token-capture receipt path marked a row truncated only when the assembled sequence length equalled
max_seq_len, so a terminal response ending withincomplete_details.reason=max_output_tokensbelow that limit escapedoverlong_filteringand undercounted truncation metrics. This carries Gym'sLinearizedRow.incomplete_reasonthroughfinalize_rolloutintoFinalizedRollout.terminal_incomplete_reasonand treats the #4491 length-exhaustion verdicts (max_output_tokens,length,max_tokens) as truncation in_truncated_flags, alongside the existing length check. Completed, content-filtered, and legacy receipts without the verdict stay non-truncated. A zero-token context-exhausted final turn is still rejected by Gym (empty_generation) and published as a masked placeholder, never a trainable row.Issues
Fixes #4737
Convergence / perf / functionality proof
New regression test
test_finalize_group_marks_terminal_length_truncationdrivesRolloutReassembler.finalize_groupover five rollouts (zero-token context-exhausted final turn, terminal length exhaustion below the limit, ordinary completed, content-filtered, legacy receipt) and checks the publishedTRUNCATEDcolumn,finalize/truncated_count, and the downstream overlong filter. Verified locally: the test fails on the base commit (truncated_count0.0) and passes with the fix. Note: the full pytest suite could not run on this machine (no GPU; the local Ray/gRPC stack cannot start a cluster here), so CI is the end-to-end check.Needs upstream changes
None
PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.