feat(scorers): add NamedScorer wrapper to support custom scorer names - #533
Open
nmath-goog wants to merge 1 commit into
Open
feat(scorers): add NamedScorer wrapper to support custom scorer names#533nmath-goog wants to merge 1 commit into
nmath-goog wants to merge 1 commit into
Conversation
nmath-goog
requested review from
IsmailMehdi,
helloeve and
prernakakkar-google
as code owners
July 28, 2026 16:55
nmath-goog
force-pushed
the
feature-named-scorer
branch
6 times, most recently
from
July 31, 2026 22:41
a607991 to
27cb201
Compare
nmath-goog
force-pushed
the
feature-named-scorer
branch
2 times, most recently
from
August 4, 2026 22:28
44ecaa6 to
d5897c3
Compare
Collaborator
|
/gcbrun |
nmath-goog
force-pushed
the
feature-named-scorer
branch
from
August 5, 2026 17:45
81c859b to
5d51300
Compare
Value proposition / Summary of Changes: - Introduces NamedScorer (evalbench/scorers/namedscorer.py), a wrapper around Comparator that encapsulates custom metric names defined in YAML configs. - Updates get_scorer_instance in evalbench/scorers/score.py to recognize custom/non-default scorer names (e.g. type: python_scorer or nested dicts) and wrap them with NamedScorer. - Updates evalbench/reporting/analyzer.py to dynamically resolve metric names and aggregate sub-comparators cleanly. Test Plan & Verification: - Unit tests added in evalbench/test/named_python_scorer_test.py and evalbench/test/score_test.py. - Ran pycodestyle (0 errors) and pytest test suite. TAG=agy CONV=fa97fdc6-3cc9-4993-894b-95e74d57a73d
nmath-goog
force-pushed
the
feature-named-scorer
branch
2 times, most recently
from
August 5, 2026 18:19
506518f to
893f60e
Compare
Collaborator
|
/gcbrun |
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.
Introduces the NamedScorer wrapper class to support custom top-level YAML keys in run configurations (e.g. rubric_pass_fail: {type: python_scorer}).
Summary of Changes
Test Plan & Verification