From b83947778e2c776f757a07d4719b7ce961d7ed55 Mon Sep 17 00:00:00 2001 From: Yuren Hao Date: Fri, 3 Jul 2026 05:56:50 -0500 Subject: =?UTF-8?q?Initial=20commit:=20ept=20=E2=80=94=20backprop-free=20e?= =?UTF-8?q?quilibrium=20transformer=20(EP)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_014FAPDWQ49M5Ye3NpTndTpn --- ep_run/t2fix_freezer.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 ep_run/t2fix_freezer.py (limited to 'ep_run/t2fix_freezer.py') diff --git a/ep_run/t2fix_freezer.py b/ep_run/t2fix_freezer.py new file mode 100644 index 0000000..d5d090f --- /dev/null +++ b/ep_run/t2fix_freezer.py @@ -0,0 +1,21 @@ +import time, os, re, shutil +os.chdir("/home/yurenh2/ept/ep_run") +LOG, CK = "runs/ep_t2fix.log", "runs/ep_t2fix.pt" +os.makedirs("runs/t2fix_traj", exist_ok=True) +last_mt=0; t0=time.time() +while time.time()-t0 < 24*3600: + time.sleep(30) + try: ls=[l for l in open(LOG) if l.startswith("step")] + except Exception: continue + if not ls: continue + m=re.search(r"step\s+(\d+)/.*res=([\d.eE+-]+)", ls[-1]) + if not m: continue + step=int(m.group(1)); res=float(m.group(2)) + try: mt=os.path.getmtime(CK) + except Exception: continue + if mt!=last_mt and os.path.getsize(CK)>1e6: + last_mt=mt + try: shutil.copy2(CK, f"runs/t2fix_traj/s{step}.pt"); print(f"froze s{step} res={res:.2e}",flush=True) + except Exception: pass + if res>0.25: print(f"ep_t2fix DIVERGED step {step}",flush=True); break +print("t2fix freezer done") -- cgit v1.2.3