plots: dejargon, drop redundant titles, emit png+svg+pdf, CSV re-render

Audit of all 4 plot scripts (plot_dynamics/substrate/emergence/deploy_overlay):
- One save_fig(fig, path) helper in figs.py writes png+svg+pdf (vector for the
  paper, png for the blog). All scripts call it.
- arm_label() map: reader-facing names only -- route2->route, drop 'knob'/'the
  cheat' from titles and the train-vs-deploy story (adapter on/off, reward hack).
- Titles off by default (the paper/blog caption carries it); --title re-enables
  for standalone research use.
- dump_data CSV now carries every plotted series; plot_dynamics --from-csv
  re-renders the three figures from the committed CSV with no logs (logs/ and
  out/runs/ are gitignored; out/figs/*.csv is tracked). Round-trip verified.
- Commit the regenerated dyn_sub4 figures in all 3 formats + the CSV.

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-06-03 02:44:39 +00:00
co-authored by Claudypoo
parent 17a8792340
commit 87cca9a603
15 changed files with 8854 additions and 62 deletions
+8 -5
View File
@@ -21,9 +21,12 @@ import matplotlib.pyplot as plt
import numpy as np
from loguru import logger
from projected_grpo.figs import link_latest
from projected_grpo.figs import link_latest, save_fig
from plot_dynamics import _ema, _gather, _onset, parse_log
# Captioned downstream, so the title just restates the caption. --title re-enables.
SHOW_TITLE = False
# Distinct hue per mode (qualitative). solve drawn dashed in the same hue so each
# mode's hack/solve pair reads together.
MODE_COLORS = {
@@ -71,11 +74,11 @@ def plot(runs_by_mode: dict[str, list[dict]], out: Path) -> None:
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
ax.tick_params(labelsize=8)
ax.set_title("Loophole emergence under vanilla GRPO "
"(solid=hack/exploited, dashed=solve/gt_correct; EMA-5)", fontsize=9)
if SHOW_TITLE:
ax.set_title("Loophole emergence under vanilla GRPO "
"(solid=hack/exploited, dashed=solve/gt_correct; EMA-5)", fontsize=9)
fig.tight_layout()
out.parent.mkdir(parents=True, exist_ok=True)
fig.savefig(out, dpi=150, bbox_inches="tight")
save_fig(fig, out)
logger.info(f"wrote {out} (modes={modes})")