Repository navigation
Fix parsing is_truncated for multi-turn envs - #856
Merged
Merged
Conversation
mikasenghaas
force-pushed
the
mika/chore/bump-envs
branch
from
August 29, 2025 09:21
b5b4b94 to
1ea4eeb
Compare
mikasenghaas
force-pushed
the
mika/fix/multi-turn-parse-truncation
branch
from
August 29, 2025 09:21
30995bf to
4ed1ae0
Compare
willccbb
approved these changes
Aug 29, 2025
mikasenghaas
force-pushed
the
mika/fix/multi-turn-parse-truncation
branch
from
August 29, 2025 09:52
4ed1ae0 to
c9caeaf
Compare
mikasenghaas
marked this pull request as ready for review
August 29, 2025 09:53
willccbb
approved these changes
Aug 29, 2025
hallerite
added a commit
that referenced
this pull request
Oct 2, 2026
Bumps prime-envs from 565e8a7 to e82de8b: PI-ProgramBench (#866), ProgramBench on native Harbor (#856), the swebench-pro captured-patch artifact fix (#874), and the HLE-Diamond (#853, #867) and Recursive Task Synthesis (#807) environments. uv.lock picks up the new and removed workspace members. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Previously, the
parse_truncated_completions, wrongly, appends truncation information for each response within a multi-turn interaction (e.g. many chat interactions, tool calls, etc.). This leads to a shape mismatch because thelen(is_truncated) > batch_sizewhich is unexpected.This PR proposes the following logic for computing
is_truncatedfor a multi-turn interaction: If any response within the multi-turn completion is truncated, the entire rollout is truncated. Note, that non-LLM responses like user messages or tool call responses, are not counted here (they do not have theresponse.finish_reasonfield and as such are always not truncated).I verified that the multi-turn
alphabet-sortenvironment is functional again (it is broken on current main)GitHub Issue: #855
Linear Issue: Resolves PRIMERL-81