diff options
| author | Yuren Hao <yurenh2@illinois.edu> | 2026-07-03 05:56:50 -0500 |
|---|---|---|
| committer | Yuren Hao <yurenh2@illinois.edu> | 2026-07-03 05:56:50 -0500 |
| commit | b83947778e2c776f757a07d4719b7ce961d7ed55 (patch) | |
| tree | b9cc01d7adda691d9156d9d04f4fb2f644674e96 /ep_run/ep_jacreg_binary.py | |
Initial commit: ept — backprop-free equilibrium transformer (EP)
Code (ep_run/), organized docs (docs/{method,campaign,hardware,outreach,paper}),
analysis scripts (scripts/), ONBOARDING.md entry point. Large data/checkpoints
git-ignored (share separately).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn
Diffstat (limited to 'ep_run/ep_jacreg_binary.py')
| -rw-r--r-- | ep_run/ep_jacreg_binary.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ep_run/ep_jacreg_binary.py b/ep_run/ep_jacreg_binary.py new file mode 100644 index 0000000..f5b0b1e --- /dev/null +++ b/ep_run/ep_jacreg_binary.py @@ -0,0 +1,22 @@ +import time, os, re, subprocess +os.chdir("/home/yurenh2/ept/ep_run"); LOG="runs/ep_jacreg.log"; TARGET=2.30 +def alive(): return subprocess.run(["pgrep","-f","ckpt runs/ep_jacreg.pt"],capture_output=True).returncode==0 +def latest(): + try: ls=[l for l in open(LOG) if l.startswith("step")] + except Exception: return None + if not ls: return None + l=ls[-1] + ms=re.search(r"step\s+(\d+)",l); mv=re.search(r"val CE ([\d.]+)",l); mb=re.search(r"best ([\d.]+)",l) + mr=re.search(r"res=([\d.eE+-]+)",l); mj=re.search(r"jr=([\d.eE+-]+)",l) + if not(ms and mv and mb and mr): return None + return int(ms.group(1)),float(mv.group(1)),float(mb.group(1)),float(mr.group(1)),float(mj.group(1)) if mj else 0.0 +fired=None; t0=time.time() +while fired is None and time.time()-t0<12*3600: + time.sleep(90) + if not alive(): fired=f"EXITED last={latest()}"; break + d=latest() + if not d: continue + step,val,best,res,jr=d + if res>0.3 or val>12: fired=f"ep_jacreg BLEW @step{step} val{val:.2f} res{res:.1e} jr{jr:.1f} (best had been {best:.4f})"; break + if best<=TARGET: fired=f"ep_jacreg reached {TARGET} @step{step} best {best:.4f} val{val:.3f} res{res:.1e} jr{jr:.1f}"; break +print(f"=== EP_JACREG -> {TARGET} (blow or descend) ==="); print(fired or "12h timeout still between 2.40-2.30"); print("last:",latest()) |
