Upload scripts/push_to_hf.sh with huggingface_hub
Browse files1234567891011121314151617181920212223242526272829303132333435363738#!/usr/bin/env bash# Выгрузка кода FANTA на Hugging Face Hub (без датасетов / unified parquet).# Нужен: hf auth login## ./scripts/push_to_hf.sh# HF_REPO_ID=Saintghetto17/FANTA ./scripts/push_to_hf.sh## Автопуш при сохранении файлов: ./scripts/watch_and_push_hf.sh#set -euo pipefail
REPO="${HF_REPO_ID:-Saintghetto17/FANTA}"ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
echo "Repo: $REPO"echo "Root: $ROOT"echo ""
if ! command -v hf >/dev/null 2>&1; then echo "hf CLI not found. Install: curl -LsSf https://hf.co/cli/install.sh | bash" >&2 exit 1fi
echo "Uploading fanta/ ..."hf upload "$REPO" "$ROOT/fanta" "fanta"
echo "Uploading train_fanta.py, joblib_quiet.py, requirements-fanta.txt ..."hf upload "$REPO" "$ROOT/train_fanta.py" "train_fanta.py"hf upload "$REPO" "$ROOT/joblib_quiet.py" "joblib_quiet.py"hf upload "$REPO" "$ROOT/requirements-fanta.txt" "requirements-fanta.txt"
echo "Uploading scripts/ ..."hf upload "$REPO" "$ROOT/scripts/train_all_presets_8gpu.sh" "scripts/train_all_presets_8gpu.sh"hf upload "$REPO" "$ROOT/scripts/push_to_hf.sh" "scripts/push_to_hf.sh"hf upload "$REPO" "$ROOT/scripts/watch_and_push_hf.sh" "scripts/watch_and_push_hf.sh"
echo ""echo "Done. Чекпоинты модели отдельно: hf upload $REPO /path/to/checkpoint ."scripts/push_to_hf.shAdded+38