SabaPivot's picture
download
raw
1.3 kB
#!/usr/bin/env bash
# Publish the logbook as soon as the HF "20 spaces per day" quota resets, then
# verify the published Space. Detached; logs to publish_retry.log.
set -u
cd /home/ubuntu/samuel/interp-agg-repro || exit 1
SLUG="repro-the-interplay-between-interpolation-and-aggregation-in-regression-optimal-sample-complexit"
SPACE="SabaPivot/${SLUG}"
LOG=/home/ubuntu/samuel/interp-agg-repro/publish_retry.log
PY=/home/ubuntu/samuel/repro/.venv/bin/python
echo "=== retry loop started $(date -u +%FT%TZ) target=${SPACE} ===" >>"$LOG"
for i in $(seq 1 60); do
echo "--- attempt $i $(date -u +%FT%TZ) ---" >>"$LOG"
if timeout 1200 trackio logbook publish "$SPACE" >>"$LOG" 2>&1; then
echo "PUBLISH OK $(date -u +%FT%TZ)" >>"$LOG"
sleep 60
{
echo "--- verification ---"
curl -sL "https://huggingface.co/spaces/${SPACE}/raw/main/pages/executive-summary/page.md" | grep -c poster_embed
$PY - <<PYEOF
from huggingface_hub import HfApi
api = HfApi()
i = api.space_info("${SPACE}")
print("private:", i.private)
print("stage:", i.runtime.stage if i.runtime else None)
print("tags:", i.tags)
PYEOF
} >>"$LOG" 2>&1
exit 0
fi
echo "attempt $i failed; sleeping 900s" >>"$LOG"
sleep 900
done
echo "GAVE UP after 60 attempts $(date -u +%FT%TZ)" >>"$LOG"
exit 1

Xet Storage Details

Size:
1.3 kB
·
Xet hash:
8f77eb03c924b3a065ea803dc03c4b9fe4d2aab2e48106dc4c9797f4afa01f72

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.