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.