Files
steer-heal-love/scripts/results.py
T
wassname 81340e3272 axis = SocialNorms/Care (Authority degenerate); over-steer generation
scripts/diag_axis.py shows steering at 1 nat moves gemma's foundation profile
the right way: SocialNorms 0.68->0.42, Care 0.21->0.33, coherence 0.72->0.88.
Authority is ~0 on this model (no headroom), so:
- eval reports all foundations; trait axis = SocialNorms (down) + Care (up)
- map.html plots Care vs SocialNorms
- add gen_alpha=1.5: over-steer generation into the incoherent regime so the
  heal (Q1) has work to do (at 1 nat coherence improved, nothing to heal)
- results.py groups on coherence/socialnorms/care

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
2026-06-04 10:28:52 +08:00

33 lines
1.1 KiB
Python

"""`just results`: group results.tsv into comparable arms and print a markdown table.
Grouping key is `reg` (the regulariser under test, U2); argv last so each row is
copy-paste reproducible. Edit GROUP when the knob under test changes.
"""
from pathlib import Path
import polars as pl
from tabulate import tabulate
RESULTS_TSV = Path(__file__).resolve().parents[1] / "results.tsv"
GROUP = ["reg"] # all-else-equal grouping; the arm under test
if not RESULTS_TSV.exists():
raise SystemExit(f"no {RESULTS_TSV.name} yet; run something first")
df = pl.read_csv(RESULTS_TSV, separator="\t")
agg = (
df.group_by(GROUP)
.agg(
pl.col("coherence").mean().round(3),
pl.col("socialnorms").mean().round(3), # trait axis: lower = more trait
pl.col("care").mean().round(3),
pl.col("care").std().round(3).alias("care_sd"),
pl.len().alias("n"),
pl.col("seed").cast(pl.Utf8).sort().str.join(",").alias("seeds"),
pl.col("argv").first(),
)
.sort("care", descending=True)
)
print(tabulate(agg.to_pandas(), headers="keys", tablefmt="pipe", floatfmt="+.3f"))