Repository navigation
fix(ingest): parse fraction scores and flag unexpected score scales - #176
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughThe PR adds fraction-style score coercion and a benchmark health scale-sanity check. The check evaluates observed metric ranges, propagates range metadata through audits, reports PASS/WARN/SKIP findings, and updates tests and documentation. ChangesFraction-style score parsing
Score-scale sanity auditing
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant AuditSuite
participant AuditRunner
participant BenchmarkHealth
AuditSuite->>AuditSuite: collect observed metric ranges
AuditSuite->>AuditRunner: call run_audit with observed_ranges
AuditRunner->>BenchmarkHealth: run benchmark health audit
BenchmarkHealth-->>AuditRunner: return scale_sanity finding
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/evaltrust/audit/benchmark_health.py`:
- Around line 208-216: Update the `how_to_fix` message in the benchmark health
result so scale-sanity findings recommend normalizing scores to a shared scale,
without presenting `score_ceiling` as a remedy. Describe `score_ceiling` only as
separate saturation configuration, while preserving the existing status-specific
guidance and insufficient-data message.
- Around line 158-174: Update the mixed-scale checks in _audit benchmark scale
detection at src/evaltrust/audit/benchmark_health.py lines 158-174 to require
unambiguous fractional normalized values (strictly between 0 and 1), unless
declared scale metadata is available, before either warning path can trigger;
preserve existing thresholds otherwise. In tests/test_benchmark_health.py lines
136-142, replace the ambiguous [0, 1] contamination case with clearly fractional
normalized contamination and add a regression case confirming clean scores
spanning 0–100 do not produce a mixed-scale warning.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 071b4cc7-2f9d-4194-8e92-c2c1b209928f
📒 Files selected for processing (9)
CHANGELOG.mddocs/checks.mdsrc/evaltrust/adapters/common.pysrc/evaltrust/audit/benchmark_health.pysrc/evaltrust/audit/runner.pysrc/evaltrust/audit/suite.pytests/test_benchmark_health.pytests/test_ingest_common.pytests/test_suite.py
|
@pnascimento9596 Fix the conflict, then good to merge |
22f280c to
043b632
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
rebase is clean and the suite is green. good to merge. |
Summary
A/BandA out of Bscore strings as ratios.scale_sanityfinding for mixed or unexpected score ranges.Decision conformance
coerce_scorepath. Zero or negative denominators and negative numerators remain errors. Values are not capped at 1.0.Flagged decision
existing datasets with mixed scales will now drop to MODERATE, and that is the point of the check, but it is a behavior change on previously-quiet inputs.
Fixture grounding
No fraction-style score export was present on
upstream/mainatd508963ce1940b30a2d510b7f496c97ffc0dbdf0intests/fixtures/, the ingestion and adapter tests,docs/, orsrc/evaltrust/adapters/. The accepted fraction forms are grounded in the maintainer's issue examples only.A of Bremains rejected.Validation
3/5coercion and mixed-scale suite findings.fractions.Fraction.b719c1864ebc5933bb91bb3204c93f248bbd2155fb3c0160d03a928d85195879.351d1c661530fdebb9fe58ff18c398f097924a216d5d72adc85606822715f629.Changelog
Closes #169
Summary by CodeRabbit
New Features
3/5and4 out of 5.Bug Fixes
Documentation