#!/usr/bin/env bash # Retry publishing the logbook until the HF outage clears. set -u cd "D:/Root/Repositories/Personal/ICML-2026-HF/repro_vla_mbpo" || exit 1 export PYTHONUTF8=1 TRACKIO=../.venv/Scripts/trackio.exe HF=../.venv/Scripts/hf.exe SPACE="srilearns/vla-mbpo-icml2026-repro" for attempt in $(seq 1 240); do # up to ~4h at 60s spacing echo "[auto_publish] attempt $attempt ($(date))" if "$TRACKIO" logbook publish "$SPACE" 2>&1 | tee /tmp/pub.log | tail -6; then if grep -qiE "https://huggingface.co/spaces/$SPACE|published|View your logbook" /tmp/pub.log \ && ! grep -qiE "50[0-9] |Bad Gateway|Gateway Timeout|HfHubHTTPError" /tmp/pub.log; then echo "[auto_publish] PUBLISH OK" # upload full bundle to the results dataset repo too "$HF" upload srilearns/vla-mbpo-repro . . --repo-type dataset \ --exclude "paper/*.pdf" --exclude "**/__pycache__/*" 2>&1 | tail -3 || true echo "[auto_publish] DONE: https://huggingface.co/spaces/$SPACE" exit 0 fi fi echo "[auto_publish] not yet; sleeping 60s" sleep 60 done echo "[auto_publish] gave up after many attempts; run 'trackio logbook publish $SPACE' manually" exit 1