Fix harm category normalization in scorer evaluation - #2646
San (San-exe) wants to merge 2 commits into
Conversation
|
@microsoft-github-policy-service agree |
|
Thanks for picking this up. Some context that isn't obvious from the outside: #2570 was already fixed by #2575 and #2616 before this PR landed, and the remaining gaps got tracked in #2661. #2663 has since taken the same ground, and because it tightens the matcher rather than changing which value is compared, it covers all three of the #2661 findings. The two PRs also conflict — both rewrite Two things worth knowing for future reference, because they're genuinely subtle and both would have been easy to miss in review: 1. The configured category can mask a genuinely mismatched dataset. Because the configured value replaces the human-label category unconditionally, there's no longer an equivalence check between them. Pairing a 2. Objective evaluation regresses. Two smaller ones while you're in there: 3. The metrics lose their harm category on the public path. The CSV-derived local is renamed to harm_category=harm_category, # the new parameter, None unless passed
4. Given #2663 resolves the open issue, I'd suggest closing this one. If you'd like the |
|
Closing this as superseded — #2663 landed the same ground and covers all three of the #2661 findings. Thanks again for the contribution, and sorry it didn't end up merging. The |
Summary
Fix scorer evaluation when the dataset
harm_categoryand scorer output category use different naming schemes for the same harm category.Changes
harm_categorythroughScorerEvaluator.run_evaluation_async()intoevaluate_dataset_async().fairness_biasas an alias forREPRESENTATIONALinHarmCategory.fairness_bias→REPRESENTATIONALandsexual→SEXUAL_CONTENTcategory matching.Validation
git diff --checkis clean.