soup/soup_cli/eval
Alpamys ca799f6fd3 feat(eval,registry): live gate scoring + registry attach (v0.33.0 Part A wave 1)
Closes #32, #35. (#34 soup can run/publish deferred to Part A wave 2.)

#32 Live model scoring for `soup eval gate` + `soup eval quant-check`:
- gate.run_gate now dispatches judge / benchmark / custom task types,
  wrapping each scorer in try/except so a backend failure produces
  score=None + error=str(exc) instead of a silent score=1.0 pass.
- New _parse_judge_url splits ollama:// / http(s):// judge_model URLs
  into (provider, model, api_base) for JudgeEvaluator.
- New _run_judge_task / _run_benchmark_task plug into existing
  eval/judge.py and eval/forgetting.py runners.
- New quant_check.make_model_generator(model_path) wraps transformers
  AutoTokenizer + AutoModelForCausalLM into a generate_fn callable;
  greedy by default for reproducible scores; lazy-imported.
- gate_cmd / quant_check_cmd build live generators when --model is
  given; fall back to deterministic stub on load failure so CI without
  GPUs still runs the orchestration layer.
- GateTaskResult.score is now Optional[float] with new error: Optional[str].
- _print_gate_result renders ERROR + reason cleanly.

#35 Registry attach hooks:
- registry/store.py _VALID_KINDS extended with eval_results, tensorrt.
- New registry/attach.py: attach_artifact, write_eval_json
  (cwd-containment via realpath+commonpath), lookup_entry_by_output_dir.
- `soup eval custom` gains --attach-to-registry + --output (paired);
  on success writes JSON results and adds eval_results artifact row.
- `soup export` gains --registry-id with auto-match by source --model
  output dir; auto-attaches the produced GGUF artifact. Failures here
  are warnings, not hard exits — export already succeeded.

Tests: +19 in tests/test_part_a_wave1.py covering URL parser, error
propagation across all 3 task types, score=None semantics, generator
factory bounds + transformers mocking, registry attach helpers
(containment + missing entry), and CLI integration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 18:06:27 +05:00
..
__init__.py feat: add eval platform with custom evals, LLM judge, human eval, leaderboard (v0.19.0) 2026-04-01 14:47:08 +05:00
checkpoint_intelligence.py feat(security): standalone hardening (v0.33.0 Part F) 2026-04-27 17:51:38 +05:00
custom.py feat(v0.25.0): Beyond the Wrapper — 8 major features 2026-04-13 12:58:11 +05:00
forgetting.py feat(v0.25.0): Beyond the Wrapper — 8 major features 2026-04-13 12:58:11 +05:00
gate.py feat(eval,registry): live gate scoring + registry attach (v0.33.0 Part A wave 1) 2026-04-27 18:06:27 +05:00
human.py feat: add eval platform with custom evals, LLM judge, human eval, leaderboard (v0.19.0) 2026-04-01 14:47:08 +05:00
judge.py feat: add eval platform with custom evals, LLM judge, human eval, leaderboard (v0.19.0) 2026-04-01 14:47:08 +05:00
leaderboard.py feat: add eval platform with custom evals, LLM judge, human eval, leaderboard (v0.19.0) 2026-04-01 14:47:08 +05:00
quant_check.py feat(eval,registry): live gate scoring + registry attach (v0.33.0 Part A wave 1) 2026-04-27 18:06:27 +05:00