Sync from GitHub via hub-sync
Browse files76 unmodified lines77787980818276 unmodified lines`ls` the repo to check whether a `-bucket.py` variant exists for the model you wantbefore assuming it's available.## Common flags across dataset-mode scriptsMost scripts support: `--max-samples`, `--shuffle`, `--seed`, `--split`, `--image-column`,76 unmodified lines7778798081828384858687888990919293949576 unmodified lines`ls` the repo to check whether a `-bucket.py` variant exists for the model you wantbefore assuming it's available.The `-v` source can also be a **local directory** (`huggingface_hub` ≥ 1.22) — the CLIsyncs it to a private bucket and mounts it, so local images/PDFs need no upload step:hf jobs uv run --flavor l4x1 -s HF_TOKEN \-v ./pages:/input \-v hf://buckets/<user>/<output>:/output \https://huggingface.co/datasets/uv-scripts/ocr/raw/main/<script>-bucket.py \/input /outputRe-runs only sync new/changed files. Local mounts are read-only by default; a local*output* dir works too with `:rw` — pull results back with the `hf buckets sync`command the CLI prints at launch.## Common flags across dataset-mode scriptsMost scripts support: `--max-samples`, `--shuffle`, `--seed`, `--split`, `--image-column`,
25 unmodified lines2627282930313225 unmodified linesdep (e.g. bucket I/O → `bucketbag`, [#67](https://github.com/davanstrien/uv-scripts-for-ai/issues/67)),never a local import. Recipes = inline; internal tooling may share freely.- **GPU + output.** Check `torch.cuda.is_available()` and exit clearly if absent. Write to the Hub(`push_to_hub`) or a bucket (`-v hf://…`), never local paths (Jobs disk is ephemeral).- **vLLM image + fail-fast preflight.** If the model's arch isn't in a stable vLLM wheel, **omit`vllm`/`torch` from deps** and run on the pinned `vllm/vllm-openai` image via`--image … --python … -e PYTHONPATH=…`; add a preflight that `sys.exit(1)`s naming the exact flags25 unmodified lines262728293031323325 unmodified linesdep (e.g. bucket I/O → `bucketbag`, [#67](https://github.com/davanstrien/uv-scripts-for-ai/issues/67)),never a local import. Recipes = inline; internal tooling may share freely.- **GPU + output.** Check `torch.cuda.is_available()` and exit clearly if absent. Write to the Hub(`push_to_hub`) or a bucket (`-v hf://…`), never bare local paths (Jobs disk is ephemeral; local *input*dirs mount via `-v ./dir:/mnt`, synced to a bucket automatically).- **vLLM image + fail-fast preflight.** If the model's arch isn't in a stable vLLM wheel, **omit`vllm`/`torch` from deps** and run on the pinned `vllm/vllm-openai` image via`--image … --python … -e PYTHONPATH=…`; add a preflight that `sys.exit(1)`s naming the exact flags
AGENTS.md+13
CLAUDE.md+2-1