Download python_lora_dataset_builder/scripts/run_daily.sh from api-relay/sadASDasd: direct link, hf CLI and curl.
- Browser
- Download file 1.56 kB
-
https://huggingface.co/datasets/api-relay/sadASDasd/resolve/main/python_lora_dataset_builder/scripts/run_daily.sh
- Command line
-
hf download hf://datasets/api-relay/sadASDasd/python_lora_dataset_builder/scripts/run_daily.sh
-
curl -L -o run_daily.sh https://huggingface.co/datasets/api-relay/sadASDasd/resolve/main/python_lora_dataset_builder/scripts/run_daily.sh
1.56 kB
| # Run this once (whenever you sit down to run it — daily, every few days, | |
| # whatever works) to process the NEXT batch of rows. It always resumes from | |
| # wherever the last run left off, so running this once a day for a few weeks | |
| # is exactly the intended usage. It's also fine to interrupt with Ctrl+C — | |
| # see README "Stopping and recovering" section. | |
| # | |
| # Usage: | |
| # scripts/run_daily.sh # dry run, 500 rows (safe default) | |
| # scripts/run_daily.sh --real # real run (spends NIM API requests), 500 rows | |
| # scripts/run_daily.sh --real 200 # real run, 200 rows this session | |
| set -euo pipefail | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| PROJECT_DIR="$(dirname "$SCRIPT_DIR")" | |
| cd "$PROJECT_DIR" | |
| if [ ! -d ".venv" ]; then | |
| echo "No .venv/ found — run scripts/setup.sh first." | |
| exit 1 | |
| fi | |
| # shellcheck disable=SC1091 | |
| source .venv/bin/activate | |
| # Keep dependencies in sync with requirements.txt automatically. This is | |
| # fast (a few hundred ms) when everything is already installed, and only | |
| # actually downloads/installs when requirements.txt has changed — it never | |
| # touches anything outside .venv/. | |
| pip install --quiet -r requirements.txt | |
| MODE="--dry-run" | |
| LIMIT="500" | |
| if [ "${1:-}" = "--real" ]; then | |
| MODE="" | |
| LIMIT="${2:-500}" | |
| elif [ -n "${1:-}" ]; then | |
| LIMIT="$1" | |
| fi | |
| echo "Running: python main.py --limit $LIMIT $MODE" | |
| echo "(Ctrl+C once = finish current record, save progress, stop cleanly.)" | |
| echo | |
| # shellcheck disable=SC2086 | |
| python main.py --limit "$LIMIT" $MODE | |