English: README, CLAUDE.md, archive note; sessions/ (ex seances); the session of the 2026-11-16 trial (NORDEND, S1 kept)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2cb0c88a2b
commit
63bebbc415
19 files changed
+689
-39
No files matched your search
@@ -0,0 +1,30 @@
|
||||
"""Compare two outputs of bench/regression.py: print the station/family lines that changed, flagging a regression (found or correct down by more than 2 points). Usage: python3 bench_diff.py BEFORE.txt AFTER.txt"""
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def parse(path):
|
||||
out, station = {}, None
|
||||
for line in open(path, encoding="utf-8"):
|
||||
if line and not line.startswith(" ") and line.strip():
|
||||
station = line.split(":")[0].strip()
|
||||
continue
|
||||
m = re.match(r"\s+(\S.*?)\s{2,}(\S+(?: \(\d+ %\))?|—)\s+(\S+(?: \(\d+ %\))?|—)\s*$", line)
|
||||
if m and m.group(1) != "found":
|
||||
out[(station, m.group(1))] = (m.group(2), m.group(3))
|
||||
return out
|
||||
|
||||
|
||||
def pct(x):
|
||||
m = re.match(r"(\d+)/(\d+)", x)
|
||||
return 100 * int(m.group(1)) / int(m.group(2)) if m and int(m.group(2)) else None
|
||||
|
||||
|
||||
a, b = parse(sys.argv[1]), parse(sys.argv[2])
|
||||
for k in sorted(set(a) | set(b)):
|
||||
va, vb = a.get(k, ("—", "—")), b.get(k, ("—", "—"))
|
||||
if va != vb:
|
||||
reg = [n for n, x, y in zip(("found", "correct"), va, vb)
|
||||
if pct(x) is not None and pct(y) is not None and pct(y) < pct(x) - 2]
|
||||
print(f"{k[0]:<12} {k[1]:<22} found {va[0]} → {vb[0]} | correct {va[1]} → {vb[1]}",
|
||||
"REGRESSION " + ",".join(reg) if reg else "")
|
||||
Reference in new issue
Block a user