permanence / tools /fetch_run5.py
chane335's picture
Run 6: forced-outcome variants + unlikeliness shaping + curriculum — break R2-only degenerate policy
68b2be2 verified
"""One-shot script to pull Run 5 artifacts from HF Hub.
Written as a file (not python -c) so shells don't choke on the newlines.
"""
from __future__ import annotations
import os
import shutil
import subprocess
from huggingface_hub import snapshot_download
def main() -> None:
target = "training_runs/run_5_grpo_success"
if os.path.exists(target):
shutil.rmtree(target)
token = subprocess.check_output(["hf", "auth", "token"], text=True).strip()
path = snapshot_download(
repo_id="chane335/permanence-artifacts",
repo_type="dataset",
local_dir=target,
token=token,
)
total = 0
for root, _dirs, files in os.walk(path):
for f in files:
rel = os.path.relpath(os.path.join(root, f), path)
if ".cache" in rel:
continue
size = os.path.getsize(os.path.join(root, f))
total += size
print(f" {size:>12,} bytes {rel}")
print(f"TOTAL: {total/1e6:.1f} MB")
if __name__ == "__main__":
main()