davanstrien HF Staff commited on
Commit
8ecca4c
·
verified ·
1 Parent(s): ec846c3

Sync from GitHub via hub-sync

Browse files
Files changed (2) hide show
  1. AGENTS.md +13 -0
  2. CLAUDE.md +2 -1
AGENTS.md CHANGED
@@ -77,6 +77,19 @@ A couple of scripts have `-bucket.py` variants (currently `falcon-ocr-bucket.py`
77
  `ls` the repo to check whether a `-bucket.py` variant exists for the model you want
78
  before assuming it's available.
79
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  ## Common flags across dataset-mode scripts
81
 
82
  Most scripts support: `--max-samples`, `--shuffle`, `--seed`, `--split`, `--image-column`,
 
77
  `ls` the repo to check whether a `-bucket.py` variant exists for the model you want
78
  before assuming it's available.
79
 
80
+ The `-v` source can also be a **local directory** (`huggingface_hub` ≥ 1.22) — the CLI
81
+ syncs it to a private bucket and mounts it, so local images/PDFs need no upload step:
82
+
83
+ hf jobs uv run --flavor l4x1 -s HF_TOKEN \
84
+ -v ./pages:/input \
85
+ -v hf://buckets/<user>/<output>:/output \
86
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/<script>-bucket.py \
87
+ /input /output
88
+
89
+ Re-runs only sync new/changed files. Local mounts are read-only by default; a local
90
+ *output* dir works too with `:rw` — pull results back with the `hf buckets sync`
91
+ command the CLI prints at launch.
92
+
93
  ## Common flags across dataset-mode scripts
94
 
95
  Most scripts support: `--max-samples`, `--shuffle`, `--seed`, `--split`, `--image-column`,
CLAUDE.md CHANGED
@@ -26,7 +26,8 @@ planned **self-review skill** (see [Deferred](#deferred--tracked)) just enforces
26
  dep (e.g. bucket I/O → `bucketbag`, [#67](https://github.com/davanstrien/uv-scripts-for-ai/issues/67)),
27
  never a local import. Recipes = inline; internal tooling may share freely.
28
  - **GPU + output.** Check `torch.cuda.is_available()` and exit clearly if absent. Write to the Hub
29
- (`push_to_hub`) or a bucket (`-v hf://…`), never local paths (Jobs disk is ephemeral).
 
30
  - **vLLM image + fail-fast preflight.** If the model's arch isn't in a stable vLLM wheel, **omit
31
  `vllm`/`torch` from deps** and run on the pinned `vllm/vllm-openai` image via
32
  `--image … --python … -e PYTHONPATH=…`; add a preflight that `sys.exit(1)`s naming the exact flags
 
26
  dep (e.g. bucket I/O → `bucketbag`, [#67](https://github.com/davanstrien/uv-scripts-for-ai/issues/67)),
27
  never a local import. Recipes = inline; internal tooling may share freely.
28
  - **GPU + output.** Check `torch.cuda.is_available()` and exit clearly if absent. Write to the Hub
29
+ (`push_to_hub`) or a bucket (`-v hf://…`), never bare local paths (Jobs disk is ephemeral; local *input*
30
+ dirs mount via `-v ./dir:/mnt`, synced to a bucket automatically).
31
  - **vLLM image + fail-fast preflight.** If the model's arch isn't in a stable vLLM wheel, **omit
32
  `vllm`/`torch` from deps** and run on the pinned `vllm/vllm-openai` image via
33
  `--image … --python … -e PYTHONPATH=…`; add a preflight that `sys.exit(1)`s naming the exact flags