mirror of
https://github.com/TheTom/turboquant_plus.git
synced 2026-10-22 02:53:13 -05:00
Two reader-facing fixes from AJ's screenshot (2026-05-02 X thread): 1. --skip-gtm / --skip-kld previously fed a stub score=100 to composite_score, so a single real KLD axis of 99.47 produced a misleading composite of 99.74 EXCELLENT. The skipped axis now contributes None to composite_score() and is excluded from the harmonic mean. CompositeScore.gtm_score / .kld_score are now Optional[float]. Text + HTML reports render "n/a" with a "skipped" badge for skipped axes instead of fake 100/EXCELLENT. The "harmonic mean of N axes" gloss reflects the real count. Diagnostics blocks (GTM diagnostics, KLD diagnostics) are replaced with a single "axis was skipped" line when the axis wasn't measured. 2. The HTML "Run details → Environment" card now surfaces the backend name (llama.cpp / MLX / vLLM / SGLang) plus engine version fields (llama_cpp_commit, mlx_lm_version, vllm_version, sglang_url, served_model_id) when the active backend populates them. Previously a report didn't say which engine ran it, which made cross-engine comparison reports ambiguous in the inbox. Tests added (test_score.py): - composite_score(gtm=None, kld=99.47) returns ~99.47 (not 99.74) - composite_score(gtm=62.40, kld=None) returns ~62.40 - composite_score(None, None) returns 0.0 FAIL (no crash) - 3-axis skip case computes correctly - interpret_pattern handles None - text_report renders "n/a" + "harmonic mean of 1 axes" on skip-gtm Refract test count: 410 -> 416. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-Authored-By: tturney1@gmail.com <tturney1@gmail.com>