Commit b45fb36
Add Jobs guide: Process Large Datasets (#2522)
* Add Process Large Datasets guide for Jobs
New docs/hub/jobs-large-datasets.md: how to read, filter, and process datasets larger than a Job's ephemeral disk — streaming, mounting + lazy reads, reading/filtering over hf:// with Polars/DuckDB, saving results to a bucket, and a Common Crawl worked example. Links canonical pages rather than restating them; adds an inbound pointer from jobs-configuration#volumes.
* small edits
* Verify snippets on live Jobs; rework hf:// and mount sections from results
Every example was run against real Jobs. Key changes from what testing showed:
- hf:// section: native Polars scan (verified ~4 min for the 28 GB sample
aggregate on the default CPU flavor) replaces the
register_filesystem(HfFileSystem()) DuckDB example, which could not
finish the same scan within the 30-minute default timeout. Native hf://
stays for datasets; HfFileSystem noted for buckets.
- Mount section: reframed for whole-file/local-path access; large Parquet
scans pointed at hf:// instead (measured several times slower through
the mount). Added the missing PEP 723 header to the script example.
- Save results: hosts the DuckDB COPY-to-bucket pattern (out-of-core
write), scaled from 100BT to 10BT, with --timeout shown and a note that
it transfers the full text column.
- Added --timeout guidance (long scans are network-bound), real output
for the Common Crawl example (verified verbatim, ~1 min, no token
needed), hf jobs hardware mention, and Title Case/heading consistency.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Fix Common Crawl link: use buckets path, not datasets
commoncrawl/commoncrawl is a Storage Bucket, not a dataset — the
datasets/ URL returns 401. Matches the buckets/ path already used in
the worked example just below.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Tighten intro + Save results wording, trim Common Crawl table
Editorial polish after review: rewrite the intro (cut repetition, name the
read paths), tighten the Save-results paragraph (drop a caveat already made
in the Read/filter section), and truncate the Common Crawl output table to
the top languages. Every code example re-verified against live Jobs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Use a heading for 'Which approach?' to match house style
Sibling Jobs pages use ## headings, not bold pseudo-headings.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Update docs/hub/jobs-large-datasets.md
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
* Update docs/hub/jobs-large-datasets.md
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
* Update docs/hub/jobs-large-datasets.md
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
* Apply remaining review suggestions: Spark distributed streaming, hffs version floor
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>1 parent 892dc27 commit b45fb36
3 files changed
Lines changed: 175 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
| 463 | + | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | 112 | | |
110 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
0 commit comments