Skip to content

Conversation

@yurekami
Copy link

@yurekami yurekami commented Jan 14, 2026

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 since MathRubric handles timeouts via asyncio.wait_for instead of using math_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 MathRubric class definition) to ensure it's in place before any MathRubric instances are created.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • Verified the warning is properly suppressed:
    • Without the filter: WARNING:math_verify.grader:Timeout is disabled as timeout_seconds is None or <= 0... appears
    • With the filter: No warning appears

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

🤖 Generated with Claude Code


Note

Suppresses a noisy warning from math_verify.grader to keep logs clean and avoid confusion.

  • Add _TimeoutWarningFilter to drop "Timeout is disabled" messages
  • Apply the filter to math_verify.grader at module load time before any MathRubric usage
  • Retain existing logger level adjustments in MathRubric.__init__

Written by Cursor Bugbot for commit e88aae8. This will update automatically on new commits. Configure here.

Add a logging filter to suppress the "Timeout is disabled" warning from
math_verify.grader. This warning is expected since MathRubric handles
timeouts via asyncio.wait_for instead of math_verify's internal timeout.

The filter is applied at module load time to ensure it's in place before
any MathRubric instances are created.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter out no timeout set warning in MathRubric

2 participants