mirror of
https://github.com/wassname/evil_MoE.git
synced 2026-06-27 16:30:30 +08:00
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:
Symlink
+1
@@ -0,0 +1 @@
|
||||
../../out/figs/dyn_sub4.png
|
||||
+1
@@ -0,0 +1 @@
|
||||
../../out/figs/dyn_sub4_hack_overlay.png
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user