Repository navigation
MAINT: Remove the multi-label true/false scorer family (revert #3676) - #4791
Open
Richard Lundeen (richlundeen) wants to merge 2 commits into
Open
Richard Lundeen (richlundeen) wants to merge 2 commits into
Richard Lundeen (richlundeen) wants to merge 2 commits into
Conversation
…oft#3676) Remove MultiLabelTrueFalseScorer, MessageMultiLabelTrueFalseScorer, and TrueFalseScoreSelector with their docs page, exports, guards, notebook section, and tests, keeping every later change to those files. No scorer on main uses the family, it cannot be used where a true/false scorer is accepted without the selector, and float-scale scorers already return one score per category. It is in no release, so no deprecation is needed. Also drop the references later PRs added in test_scorer_info.py, test_scorer_stability.py, and scorer_stability.py, and regenerate the 0_scoring scorer table, which adds the PresidioPiiScorer row it was missing. Keep test_score_category_filter.py: it covers the pre-existing score_category memory filter, not the family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the removal of the unused multi-label scorer family.
No open issues 🎉
What changed in this PR
Removes PyRIT’s unused, unreleased multi-label true/false scorer family introduced in #3676, preserving unrelated later changes and category-filter tests.
Changes:
- Deletes the scorer family, selector, exports, and associated guards and tests.
- Removes related documentation and navigation entries.
- Refreshes the scorer table, removing the selector and adding the missing
PresidioPiiScorerentry.
| File | Description |
|---|---|
tests/unit/score/test_scorer_stability.py |
Removes multi-label rejection test. |
tests/unit/score/test_scorer_info.py |
Removes selector catalog expectation. |
tests/unit/score/test_multi_label_true_false_scorer.py |
Deletes family-specific tests. |
pyrit/score/true_false/true_false_score_selector.py |
Deletes label selector. |
pyrit/score/true_false/multi_label_true_false_scorer.py |
Deletes multi-label scorer bases. |
pyrit/score/true_false/float_scale_threshold_scorer.py |
Removes obsolete import and guard. |
pyrit/score/scorer_evaluation/scorer_stability.py |
Updates docstring and removes obsolete comment. |
pyrit/score/scorer_evaluation/scorer_evaluator.py |
Removes multi-label evaluation guard. |
pyrit/score/__init__.py |
Removes deleted APIs from exports. |
doc/myst.yml |
Removes deleted guide from navigation. |
doc/code/scoring/multi_label_true_false.md |
Deletes multi-label guide. |
doc/code/scoring/1_true_false_scorers.py |
Removes label-selection documentation. |
doc/code/scoring/1_true_false_scorers.ipynb |
Removes matching notebook section. |
doc/code/scoring/0_scoring.ipynb |
Refreshes saved scorer table. |
doc/code/framework.md |
Lists only retained scorer families. |
Review effort: Balanced
Roman Lutz (romanlutz)
approved these changes
Dec 3, 2026
Several results from one scorer, such as a classifier's harm categories, belong in a float-scale scorer with one score per category, so reviews can catch another multi-label true/false design. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
Remove
MultiLabelTrueFalseScorer,MessageMultiLabelTrueFalseScorer, andTrueFalseScoreSelector, added in #3676, and keep every later change to the files it touched.Why:
TrueFalseScoreSelector,ScorerEvaluatorrejects it, andget_scorer_metricsreturnsNone.AzureContentFilterScorer), so the family is a second mechanism for the same thing.git tag --contains 910e47ee3is empty; the latest tag is v1.2.1), so it can be removed without a deprecation period.Changes:
doc/code/scoring/multi_label_true_false.mdand itsdoc/myst.ymlentry, andtests/unit/score/test_multi_label_true_false_scorer.py.pyrit.scoreexports, the guards inScorerEvaluatorandFloatScaleThresholdScorer, theframework.mdmention, and the section in1_true_false_scorers(.pyand.ipynb).framework.mdso reviews catch this design: aTrueFalseScorermakes one decision, and a scorer with several results is aFloatScaleScorerthat returns one score per category.test_scorer_info.py, the multi-label case intest_scorer_stability.py, and a comment and docstring wording inscorer_stability.py.0_scoring.ipynbfromget_scorer_info(). This drops theTrueFalseScoreSelectorrow and adds thePresidioPiiScorerrow that the saved output had been missing since FEAT: Add optional Presidio-based PII entity scorer #4573.tests/unit/memory/memory_interface/test_score_category_filter.py, which FEAT Preserve labeled true/false verdicts with explicit selection #3676 also added. It does not use the family. It coversget_scores_async(score_category=...)whole-element matching with special characters and the SQL Server boundOPENJSONcondition, both of which predate FEAT Preserve labeled true/false verdicts with explicit selection #3676 and are still used.Open PRs that use these APIs and will need an update:
MessageMultiLabelTrueFalseScorerandTrueFalseScoreSelector; it is being asked to port to a float-scale scorer instead.MultiLabelTrueFalseScorerfor a guard inDecayDeltaScorer; itsFloatScaleScorercheck already rejects these scorers, so the import and guard can be dropped.doc/myst.ymlentry next to the removed line, so they may need a trivial rebase.