filter out MathRubric timeout disabled warning #724
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
Fixes #621
Add a logging filter to suppress the "Timeout is disabled as timeout_seconds is None or <= 0" warning from
math_verify.grader. This warning is expected sinceMathRubrichandles timeouts viaasyncio.wait_forinstead of usingmath_verify's internal signal-based timeout mechanism.The existing
setLevel(logging.ERROR)approach in__init__doesn't reliably suppress this warning in all cases (e.g., depending on logging configuration, handler hierarchy, or timing). Using a logging filter that specifically targets this message is more robust.The filter is applied at module load time (before the
MathRubricclass definition) to ensure it's in place before anyMathRubricinstances are created.Type of Change
Testing
uv run pytestlocally.WARNING:math_verify.grader:Timeout is disabled as timeout_seconds is None or <= 0...appearsChecklist
🤖 Generated with Claude Code
Note
Suppresses a noisy warning from
math_verify.graderto keep logs clean and avoid confusion._TimeoutWarningFilterto drop "Timeout is disabled" messagesmath_verify.graderat module load time before anyMathRubricusageMathRubric.__init__Written by Cursor Bugbot for commit e88aae8. This will update automatically on new commits. Configure here.