FIX Retry out-of-range judge scores in scale scorers instead of failing - #2812
Merged
hannahwestra25 merged 9 commits intoSep 29, 2026
Merged
Conversation
hannahwestra25
approved these changes
Sep 28, 2026
hannahwestra25
left a comment
Contributor
There was a problem hiding this comment.
thanks for contributing !
hannahwestra25
enabled auto-merge
September 28, 2026 20:50
hannahwestra25
disabled auto-merge
September 28, 2026 20:50
hannahwestra25
enabled auto-merge
September 28, 2026 20:52
hannahwestra25
disabled auto-merge
September 28, 2026 21:57
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.
Fixes #2809.
Adds
NumericRangeResponseHandler, a wrapper in the same style asTrueFalseResponseHandler. It raisesInvalidJsonExceptionwhen the value is non-numeric, non-finite, or outside[minimum_value, maximum_value], so the normal JSON retry handles it.SelfAskScaleScorer,SelfAskGeneralFloatScaleScorerandInsecureCodeScorer(fixed 0 to 1 range) now wrap their handler with it. That includes caller-supplied handlers, which matches what Likert and true/false do.Scorer identifiers don't change since the handler isn't part of them, so eval hashes aren't affected. The judgment replay identifier now includes the range.
Tests: handler tests in
test_response_handler.py, plus a retry test for each of the three scorers (a bad value then a good one returns the good score after two calls). The scorer tests fail on main.tests/unit/scoreandtests/unit/executormatch main plus 14 new passing tests. Thetest_scorer_infoandtest_otel_tool_call_scorerfailures I see locally happen on main too.