File size: 851 Bytes
43cec43 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #!/usr/bin/env bash
set -euo pipefail
REPO_ID="${REPO_ID:-Zishan-Shao/decodeshare}"
SRC_ROOT="${SRC_ROOT:-$PWD}"
HF_NUM_WORKERS="${HF_NUM_WORKERS:-4}"
if ! command -v hf >/dev/null 2>&1; then
echo "Missing Hugging Face CLI. Install with: pip install -U huggingface_hub[hf_transfer]" >&2
exit 1
fi
cd "$SRC_ROOT"
hf upload "$REPO_ID" Hype1/results/acts artifacts/Hype1/results/acts
hf upload "$REPO_ID" patch_back/results artifacts/patch_back/results
if [[ -n "${DOWNSTREAM_SPLIT_ROOT:-}" ]]; then
hf upload-large-folder "$REPO_ID" "$DOWNSTREAM_SPLIT_ROOT" \
--repo-type model \
--num-workers "$HF_NUM_WORKERS" \
--no-bars
else
echo "Skipping downstream/outputs. Create a split staging directory and set DOWNSTREAM_SPLIT_ROOT; see docs/HUGGINGFACE_UPLOAD.md." >&2
fi
echo "Uploaded selected DecodeShare artifacts to $REPO_ID"
|