fix(plot): no-floor route2 deploy panel was blank -- hk_abl column present but all-nan

The plotter picked hk_abl (dense proxy) whenever the COLUMN existed, but no-floor
runs (rollout_ablate_frac=0) emit hk_abl as 0/0 -> all-nan, so the deploy panel
came up empty. Test for finite data (_has_data) not column presence; fall back to
the sparse-but-real hk_dep (every eval_ablate_every steps). _ema carries values
across the nan gaps -> a held step-line.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-06-01 23:36:26 +00:00
parent a1b17ab9f8
commit 83d41933b2
3 changed files with 9 additions and 3 deletions
+1
View File
@@ -0,0 +1 @@
../../out/figs/dyn_sub4.png
+1
View File
@@ -0,0 +1 @@
../../out/figs/dyn_sub4_hack_overlay.png
+7 -3
View File
@@ -128,12 +128,16 @@ def parse_log(path: Path) -> dict | None:
# under the hack_s/gt_s keys -> all downstream (panels, onset, overlay) reads
# it. Prefer the DENSE per-step proxy (hk_abl, every step) over the sparse
# held-out eval (hk_dep, every eval_ablate_every steps); fall back to hk_dep
# for older runs that predate the proxy.
# when hk_abl carries no data. No-floor runs (rollout_ablate_frac=0) have the
# hk_abl COLUMN present but every cell is "0/0" -> all-nan, so test for finite
# values, not mere column presence, else the deploy panel comes up blank.
def _has_data(key):
return key in run and np.isfinite(run[key]).any()
if arm in ("routing", "routing2"):
if "hk_abl" in run:
if _has_data("hk_abl"):
run["hack_s"] = run["hk_abl"]
run["gt_s"] = run["slv_abl"]
elif "hk_dep" in run:
elif _has_data("hk_dep"):
run["hack_s"] = run["hk_dep"]
run["gt_s"] = run["slv_dep"]
return run