Upload runners/RUN_5090_MASTER_SFT_V3.txt with huggingface_hub
Browse files64 unmodified lines6566676868697071717273747576777378798081828384858687888990919264 unmodified linesos.makedirs("checkpoints", exist_ok=True)base_ckpt_path = "checkpoints/ckpt_latest.pt"
# Robust broken symlink & corrupt checkpoint cleanerif os.path.lexists(base_ckpt_path):if os.path.islink(base_ckpt_path) or os.path.lexists(base_ckpt_path): if (not os.path.exists(base_ckpt_path)) or (os.path.getsize(base_ckpt_path) < 1024**3): try: os.remove(base_ckpt_path) os.unlink(base_ckpt_path) print("🧹 Removed previous broken checkpoint file/symlink.") except Exception: try: os.remove(base_ckpt_path) except Exception: pass pass
if not os.path.exists(base_ckpt_path): print(f"\n📥 Downloading Healthy Base Checkpoint from {REPO_ID} (ckpt_latest.pt, ~5.6 GB)...") dl = hf_hub_download(repo_id=REPO_ID, filename="checkpoints/ckpt_latest.pt", token=HF_TOKEN) real_src = os.path.realpath(dl) src_to_copy = real_src if os.path.exists(real_src) else dl if os.path.islink(base_ckpt_path) or os.path.lexists(base_ckpt_path): try: os.unlink(base_ckpt_path) except Exception: pass shutil.copyfile(src_to_copy, base_ckpt_path)
print(f"✅ Base Checkpoint Ready: {base_ckpt_path} ({os.path.getsize(base_ckpt_path)/(1024**3):.2f} GB)")runners/RUN_5090_MASTER_SFT_V3.txt+13-3