From b170b969e2d61229fbb465a602d9f96f3f64571e Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Sun, 7 Jun 2026 12:43:34 +0000 Subject: [PATCH] log: surface absolute band edges (mean lower/upper), not just width Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com> --- src/vgrout/train.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vgrout/train.py b/src/vgrout/train.py index 4e0bf76..2614d24 100644 --- a/src/vgrout/train.py +++ b/src/vgrout/train.py @@ -471,10 +471,13 @@ def main(cfg: Config) -> int: # Routing band from the pairs (against the FINAL v_grad, so a Haar override # collapses the band -- the real-vs-random discriminator). route_band = route_band_edges(raw_grads, v_grad, device) - _mean_bw = sum(hi - lo for lo, hi in route_band.values()) / len(route_band) + _mean_lo = sum(lo for lo, _ in route_band.values()) / len(route_band) + _mean_hi = sum(hi for _, hi in route_band.values()) / len(route_band) + _mean_bw = _mean_hi - _mean_lo logger.info(f"routeV band: edges from {len(route_band)} modules, " - f"mean width(upper-lower)={_mean_bw:+.3f} " - f"(>0 = pairs separate; ~0 = random/degenerate)") + f"mean lower(min clean cos)={_mean_lo:+.3f}, mean upper(max hack cos)={_mean_hi:+.3f}, " + f"mean width={_mean_bw:+.3f} (>0 = pairs separate; ~0 = random/degenerate). " + f"Live cos below lower -> kept; above upper -> routed; between -> ramps (frout).") # On a REAL v_grad the band must open (hack pairs align more than clean). # A collapsed/inverted real band = broken extraction silently mimicking the # random control -> fail loud. The Haar control is allowed to collapse.