Skip to content

evals: fix crash/correctness bugs and dedupe metric code - #245

Open
ajamous wants to merge 1 commit into
distill-2.9from
evals/fix-review-findings
Open

ajamous wants to merge 1 commit into
distill-2.9from
evals/fix-review-findings

Conversation

@ajamous

@ajamous ajamous commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Fixes from the code review on this branch's diff:

  • bench_typesafe.py: confidence of exactly 0.0 no longer crashes the run (falsy-zero bug in attribute extraction)
  • probe.py: training-needs list now actually sorts most-recent-first within a severity tier; a classify() error no longer disappears silently instead of showing up as a visible error row
  • gate.py: a threshold key with no matching summary key now fails with a clear message instead of a raw KeyError
  • model-gate.yml: the LFS cache key now also covers the vocab file's oid, so a vocab-only change can't reuse a stale cached vocab
  • distill_report.py: --version now actually reaches the heldout-set lookup key instead of it being hardcoded to 2.9
  • loaders.py / run_eval.py / finetune_distill.py: extracted the shared confusion_metrics() helper so accuracy/precision/recall/f1/block-accuracy are defined once, not twice; verified numerically equivalent to both prior implementations
  • label_audit.py / distill_labels.py: extracted the shared ask_typesafe_batch() helper so the retry/concurrency/incremental-write TypeSafe query loop isn't maintained in two places

No behavior change intended outside of the bug fixes themselves.

…view

- bench_typesafe: falsy-zero on confidence=0.0 no longer crashes
- probe: fix recency tie-break; stop silently dropping classify() errors
- gate: clear error instead of KeyError when thresholds/summary keys diverge
- model-gate.yml: cache key also covers the vocab file's LFS oid
- distill_report: --version now reaches the heldout-set key
- loaders: shared confusion_metrics(), used by run_eval and finetune_distill
  instead of two separately maintained metric implementations
- label_audit: shared ask_typesafe_batch(), used by distill_labels instead
  of a second retry/concurrency/resume harness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant