phase4_bootstrap: pin f6f10076
Browse files- kernels/phase4_bootstrap.py +20 -0
kernels/phase4_bootstrap.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Phase 4 GPU session bootstrap. The session logic lives in kernels/phase4_session.py at a pinned
|
| 2 |
+
# revision; this file only fixes what save_notebook cannot pass -- environment -- and then hands over.
|
| 3 |
+
# Edit QUOTA_LEFT_HOURS (from a live get_accelerator_quota read) before submitting; everything else the
|
| 4 |
+
# launcher already defaults correctly (9,358 tok/s planning rate, 6.9 h ceiling, 8 GB disk floor).
|
| 5 |
+
import hashlib, os, runpy, subprocess, sys
|
| 6 |
+
|
| 7 |
+
os.chdir("/kaggle/working")
|
| 8 |
+
sys.path.insert(0, "/kaggle/working")
|
| 9 |
+
REV = "f6f100763eec8782851f1b418fe869df6a4dcb92"
|
| 10 |
+
LAUNCHER_SHA = "6e55edab4e9eedd78363c572ebdd409558e0c3f76e13f4ebfbe54e6c4dd4964d"
|
| 11 |
+
os.environ["OUNCE100M_REV"] = REV
|
| 12 |
+
os.environ["QUOTA_LEFT_HOURS"] = "27.4" # live read at launch time, not the weekly maximum
|
| 13 |
+
|
| 14 |
+
url = f"https://huggingface.co/Cion-lab/ounce100m-code/resolve/{REV}/kernels/phase4_session.py"
|
| 15 |
+
rc = subprocess.run(["curl", "-sfL", url, "-o", "phase4_session.py"]).returncode
|
| 16 |
+
assert rc == 0, "could not fetch the launcher"
|
| 17 |
+
got = hashlib.sha256(open("phase4_session.py", "rb").read()).hexdigest()
|
| 18 |
+
assert got == LAUNCHER_SHA, f"launcher sha {got[:16]} != {LAUNCHER_SHA[:16]}"
|
| 19 |
+
print("BOOTSTRAP_OK", REV[:12], got[:12], flush=True)
|
| 20 |
+
runpy.run_path("phase4_session.py", run_name="__main__")
|