Commit Graph

3 Commits

Author SHA1 Message Date
Alpamys f6bc8e7bdd feat(ship): make soup ship's leg-2 regression gate real (v0.71.38)
soup ship's leg 2 — the catastrophic-forgetting / regression gate that carries
the whole SHIP / DON'T-SHIP claim — was 15 trivia prompts scored by raw
substring containment (it credited "B" for "Berlin", "3" for "13") with zero
coverage for tool-calling, safety, or JSON. This makes the gate real.

- forgetting.py: score_answer/extract_mcq_letter replace the substring scorer
  with answer-extraction (cue -> paren -> clause-terminating bare letter) +
  boundary-aware token match. MINI_BENCHMARKS expanded (mmlu 26 / common_sense
  24 / instruction 24) + new mini_arithmetic (36) so a 1-item flip trips 0.05.
  BREAKING: an existing run's verdict can change (the old gate under-reported).
- eval/gate_suites.py (new): bundled offline general-suite registry, no torch.
  DEFAULT_GENERAL_SUITE = the 4 MCQ suites + 3 behavioural JSONL suites
  (mini_tool_call / mini_format_json / mini_safety) scored per-model-absolute
  by the pure custom/diagnose scorers. _fraction_passing isolates a per-item
  scorer exception (deep-JSON RecursionError scores as a failed item).
- ship.py: leg-2 scores bundled suites offline (base+tuned) before routing any
  non-bundled name to lm-eval; default general suite = the full bundled set.
  Exit-code taxonomy: usage errors move 2 -> 3 so exit 2 means only DON'T-SHIP
  (a typo'd flag was previously indistinguishable from a caught regression).
- diagnose/__init__: "Six" -> "Seven" probes + re-export all 7 score_* fns;
  removed the dead SUPPORTED_TASK_MODES "pairwise reserved" gate.
- Bundled gate fixtures ship in the wheel via the pyproject artifacts glob.

Every bundled item is original, hand-authored (no MMLU/GSM8K rows copied).
Test count 16288 -> 16330 (+42 in tests/test_v07138.py).
2026-07-17 22:42:47 +05:00
Alpamys f4ef40e07e feat(ship): pairwise judge win-rate leg + shared pairwise judge helpers (#284)
Add eval/judge.pairwise_compare (swap-debiased) / pairwise_winrate /
make_soup_pairwise_judge (TRL BasePairwiseJudge adapter over the httpx
JudgeEvaluator), enable 'pairwise' in ship_verdict.SUPPORTED_TASK_MODES,
and wire commands/ship._leg1_pairwise + --task-mode pairwise routing.
2026-07-05 21:02:14 +05:00
Alpamys 6cb1abab8f feat(eval): soup ship — SHIP / DON'T-SHIP verdict (v0.71.25)
Add `soup ship`, a binary SHIP / DON'T-SHIP verdict after fine-tuning: it
SHIPs only when (leg 1) the task metric strictly improved AND (leg 2) no
general benchmark regressed past a forgetting threshold (default 0.05
absolute points) — otherwise DON'T SHIP, even if the task metric looks
great. The moat is leg 2 (catastrophic-forgetting gate) fused with the
task win into one decision. Exit: 0=SHIP, 2=DON'T SHIP, 1=runtime error.

- utils/ship_verdict.py: pure engine (no top-level torch) — frozen
  TaskWin/BenchmarkDelta/ShipVerdict + decide_ship (single source of
  truth for the threshold) + compute_benchmark_deltas + render/serialize.
- commands/ship.py: Typer command; --evidence offline path + live
  metric/judge leg-1 + mini(default)/lm-eval leg-2; --baseline/--output.
- Reuses run_eval / JudgeEvaluator / ForgettingDetector / resolve_baseline
  / _run_lm_eval / live_eval.make_generator.
- Hardening: --evidence O_NOFOLLOW + size cap; --task-eval cwd-contained;
  --judge-model urlparse SSRF guard; lm-eval model_args injection guard;
  --general-suite bounded.

Schema (ShipConfig) deferred — v1 is CLI-only. Pairwise judge win-rate is
a planned fast-follow. +79 tests (14514 -> 14593).
2026-06-27 23:37:35 +05:00