| # Upload the staged CS2 VLA checkpoints to a PUBLIC Hugging Face repo named "gamevla". | |
| # | |
| # Run it IN YOUR OWN TERMINAL (not through the agent) with your token: | |
| # HF_TOKEN='hf_xxx' bash /home/kangrui/gamevla_hf_upload/upload.sh | |
| # | |
| # - Creates <your-username>/gamevla (public) if it doesn't exist. | |
| # - Uploads every experiment folder (csbc/ nitrogen_starvla/ aimflow/ aimflow_v2/ aimflow_v3/). | |
| # - Safe to re-run: already-uploaded files are skipped, so it resumes if the connection drops. | |
| set -euo pipefail | |
| : "${HF_TOKEN:?set HF_TOKEN=hf_... first}" | |
| export HF_TOKEN | |
| DIR="/home/kangrui/gamevla_hf_upload" | |
| HF="$(command -v hf || command -v huggingface-cli || true)" | |
| [ -n "$HF" ] || { echo "no HF CLI found -> pip install -U 'huggingface_hub[cli]'"; exit 1; } | |
| # resolve your username deterministically via the Python API (override with HF_USER=... if needed) | |
| USER="${HF_USER:-$(python -c "from huggingface_hub import HfApi; print(HfApi().whoami()['name'])" 2>/dev/null)}" | |
| [ -n "$USER" ] || { echo "cannot resolve HF username -> re-run as: HF_USER=<name> HF_TOKEN=... bash $0"; exit 1; } | |
| REPO="$USER/gamevla" | |
| echo "[upload] $DIR -> https://huggingface.co/$REPO (public model repo)" | |
| "$HF" upload "$REPO" "$DIR" . --repo-type model \ | |
| --commit-message "CS2 VLA baselines: csbc, nitrogen_starvla, aimflow v1-v3" | |
| echo "[done] https://huggingface.co/$REPO" | |