Conversation
willccbb
approved these changes
Feb 5, 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.
Description
Currently, the scoring timeout set in
vf.MathRubricincludes eventloop lag (e.g. the time it takes until verification even starts in the thread executor) which results in the rubric falsly marking answers with 0 reward because.For example, in
aime2024with only 200 rollouts we see false timeouts because we get a burst of scoring requests because many rollouts finish simulatenously atfer 4K tokens.This PR fixes this by using asyncio timeouts only as a very high timeout time to prevent infinite hangs, the actual timing logic is thread-internal and only starts when scoring actually starts. I confirmed this work by running
aime2024at Avg@32 (960 parallel rollouts) at 4K context without any false positives (got the expected score of ~11%)It is to be noted that verification that takes actually long, we only cancel the verification after 120s (hard timeout) but this should happen fairly little and given that it is in a thread it should not block the remainder of the env execution.
Type of Change
Testing
uv run pytestlocally.Checklist
Additional Notes
Note
Medium Risk
Changes scoring behavior and concurrency defaults for math verification; while aimed at reducing false negatives, it can affect throughput and timing/CPU characteristics under load and should be validated in large evaluations.
Overview
Fixes false timeouts in
MathRubricby moving parsing/verification and elapsed-time measurement into the executor thread and only enforcingtimeout_secondsbased on that internal duration (so event-loop/executor queueing delay no longer zeros rewards).Adds a hard
HARD_TIMEOUT_SECONDS(120s) around the executor call to prevent indefinite hangs, bumps the defaultmax_workers(10→50), and updates the timeout test to assert pass/fail behavior bytimeout_secondsinstead of wall-clock timing.Written by Cursor Bugbot for commit 384487b. This will update automatically on new commits. Configure here.