Download experiments/gemma_decoder/run_pilot_v6.py from cazyundee/training: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/spaces/cazyundee/training/resolve/main/experiments/gemma_decoder/run_pilot_v6.py
- Command line
-
hf download hf://spaces/cazyundee/training/experiments/gemma_decoder/run_pilot_v6.py
-
curl -L -o run_pilot_v6.py https://huggingface.co/spaces/cazyundee/training/resolve/main/experiments/gemma_decoder/run_pilot_v6.py
1.48 kB
| """v6 pilot: 96 positions, 150 iters, PT + IT variants, results pushed to hub | |
| (so container rebuilds cannot eat them). Conditions A/B/D/E/G with heldout CE. | |
| """ | |
| import json, os, subprocess, sys, time | |
| # reuse run_pilot via subprocess for each variant; then upload both JSONs | |
| here = os.path.dirname(os.path.abspath(__file__)) | |
| PY = sys.executable | |
| for tag, model in (("pt", "google/gemma-3-270m"), | |
| ("it", "google/gemma-3-270m-it")): | |
| out_json = f"runs/gemma_pilot_v6_{tag}.json" | |
| cmd = [PY, os.path.join(here, "run_pilot.py"), | |
| "--model", model, "--hf-checkpoint", "fast_wide/latest.pt", | |
| "--positions", "96", "--iters", "150", "--out", out_json] | |
| print("=== variant", tag, "===", flush=True) | |
| r = subprocess.run(cmd, cwd="/app", capture_output=False) | |
| print(f"variant {tag} rc={r.returncode}", flush=True) | |
| # push the result to the hub | |
| if os.path.exists(out_json): | |
| try: | |
| from huggingface_hub import HfApi | |
| api = HfApi(token=os.environ.get("HF_TOKEN")) | |
| api.upload_file(path_or_fileobj=out_json, | |
| path_in_repo=f"gemma_pilot/v6_{tag}.json", | |
| repo_id="cazyundee/tinychess-ckpt", repo_type="model") | |
| print(f"pushed {out_json} -> gemma_pilot/v6_{tag}.json", flush=True) | |
| except Exception as e: | |
| print(f"push failed: {type(e).__name__}", flush=True) | |
| print("V6 PILOT ALL VARIANTS COMPLETE", flush=True) | |