Download kernels/p4_probe_runner.py from Cion-lab/ounce100m-code: direct link, hf CLI and curl.
- Browser
- Download file 1.16 kB
-
https://huggingface.co/Cion-lab/ounce100m-code/resolve/main/kernels/p4_probe_runner.py
- Command line
-
hf download hf://Cion-lab/ounce100m-code/kernels/p4_probe_runner.py
-
curl -L -o p4_probe_runner.py https://huggingface.co/Cion-lab/ounce100m-code/resolve/main/kernels/p4_probe_runner.py
1.16 kB
| # Kaggle kernel body for the Phase 4 stop/resume probe (2x T4). `save_notebook` cannot pass arguments, so | |
| # this wrapper pins the probe's revision and sha256, sets the one thing that varies between submissions | |
| # (MODE), and hands over. Edit REV/SHA/MODE before submitting; the probe asserts its own file hashes and | |
| # refuses an unknown MODE, so a stale paste here fails fast rather than running the wrong experiment. | |
| import hashlib, os, runpy, subprocess, sys | |
| os.chdir("/kaggle/working") | |
| sys.path.insert(0, "/kaggle/working") | |
| REV = "add04ae7a24bd9925115773a93e870fc1dd01f59" | |
| SHA = "f55bd29c94deff0a9309e41be2818c49db6720bf871cd60cd43de654810bfaf2" | |
| MODE = "smoke" | |
| url = f"https://huggingface.co/Cion-lab/ounce100m-code/resolve/{REV}/kernels/p4_stop_probe.py" | |
| assert subprocess.run(["curl", "-sfL", url, "-o", "p4_stop_probe.py"]).returncode == 0, "fetch probe" | |
| got = hashlib.sha256(open("p4_stop_probe.py", "rb").read()).hexdigest() | |
| assert got == SHA, ("PROBE SHA MISMATCH", got[:16], SHA[:16]) | |
| os.environ["P4_PROBE_MODE"] = MODE | |
| print("PROBE_BOOTSTRAP_OK", REV[:12], got[:12], "mode", MODE, flush=True) | |
| runpy.run_path("p4_stop_probe.py", run_name="__main__") | |