Upload runners/RUN_QUAD_5090_MASTER_SFT_V3.txt with huggingface_hub
Browse files63 unmodified lines646566676869707172737475767778798081828363 unmodified linesos.makedirs("checkpoints", exist_ok=True)base_ckpt_path = "checkpoints/ckpt_latest.pt"# If an invalid file or broken symlink exists, remove it firstif 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)print("🧹 Removed previous broken checkpoint file/symlink.")except Exception:passif 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 dlshutil.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)")63 unmodified lines6465666768697071727374757677787980818283848586878889909163 unmodified linesos.makedirs("checkpoints", exist_ok=True)base_ckpt_path = "checkpoints/ckpt_latest.pt"# Robust broken symlink & corrupt checkpoint cleanerif 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.unlink(base_ckpt_path)print("🧹 Removed previous broken checkpoint file/symlink.")except Exception:try:os.remove(base_ckpt_path)except Exception:passif 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 dlif os.path.islink(base_ckpt_path) or os.path.lexists(base_ckpt_path):try:os.unlink(base_ckpt_path)except Exception:passshutil.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_QUAD_5090_MASTER_SFT_V3.txt+12-4