From d1e93c02bf69c684d2a2e506f24f8bb5e70e1a95 Mon Sep 17 00:00:00 2001 From: Ethan <1558146696@qq.com> Date: Wed, 7 Oct 2026 18:33:25 +0800 Subject: [PATCH] sweep: the round line prints that round's draw, not the median through it Found while running it against a live engine: the line said 0.35 as 48.7 on round 3 while the three draws were 57.0, 48.7 and 35.5, because it printed the running median. Reading a sweep's drift is the whole point of the line, so it has to be the draw. The medians and the ranges are still in the line below it. --- tools/calibrate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/calibrate.py b/tools/calibrate.py index 3c279ac2..15d8b499 100644 --- a/tools/calibrate.py +++ b/tools/calibrate.py @@ -191,7 +191,7 @@ def sweep(s, values: list, base_tune: dict, key: str, label: str, say) -> dict: for v in (values if r % 2 == 0 else values[::-1]): out[v].append(s.rate({**base_tune, key: v})) say(f" round {r + 1}/{SWEEP_ROUNDS} {label}: " + - " ".join(f"{v:g} {statistics.median(out[v]):.1f}" for v in values)) + " ".join(f"{v:g} {out[v][-1]:.1f}" for v in values)) med = {v: statistics.median(out[v]) for v in values} say(f" {label}, median of {SWEEP_ROUNDS}: " + ", ".join(f"{v:g}: {med[v]:.1f} ({min(out[v]):.1f}-{max(out[v]):.1f})" for v in values) +