Add Jobs guide: Process Large Datasets#2522
Merged
Merged
Conversation
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.
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…sults 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>
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>
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>
Sibling Jobs pages use ## headings, not bold pseudo-headings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
davanstrien
marked this pull request as ready for review
July 7, 2026 11:30
Member
Author
|
IMO, we can keep iterating on this as libraries mature, but nice to document some patterns already. |
lhoestq
approved these changes
Jul 7, 2026
lhoestq
left a comment
Member
There was a problem hiding this comment.
lgtm ! I added some minor suggestions
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
Co-authored-by: Quentin Lhoest <42851186+lhoestq@users.noreply.github.com>
… version floor Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new Jobs documentation page — Process Large Datasets (
docs/hub/jobs-large-datasets.md) — under the Jobs section of the nav, plus an inbound pointer fromjobs-configuration's Volumes section.It's a task-oriented guide for working with datasets larger than a Job's ephemeral disk, opening with a short decision rule and then covering each approach:
datasets(streaming=True) — links the Stream guide and the 100× more efficient bloghf://directly with Polars/DuckDB/pandas (native readers, no mount)COPYstraight fromhf://to the mount) orpush_to_hubhf://→ DuckDB, no downloadIt links the canonical reference pages (
jobs-pricing,jobs-configuration#volumes,storage-buckets-access,datasets/stream, per-library dataset pages) rather than restating them.Verification
Every snippet was run against live Jobs. Timings that shaped the page (same aggregate query, same ~28 GB / 14-file Parquet glob):
hf://scanhf://register_filesystem(HfFileSystem())-vrepo mountHence the page's structure:
hf://native readers for scans, mounts for whole-file/local-path access, explicit--timeoutguidance for network-bound scans. The Common Crawl example runs verbatim in ~1 min on the default CPU flavor with no token; its printed output is included on the page.Notes
_toctree.ymlregion and has since merged; this branch is mergeable and rebases cleanly onmain(no conflicts).Note
Low Risk
Documentation-only changes with no runtime or API impact.
Overview
Adds a new Jobs doc page Process Large Datasets and registers it in the Hub nav (after Examples & Tutorials).
The guide explains how to work with data bigger than a Job’s ephemeral disk: a short “which approach?” decision tree, then sections on streaming (
datasets+ Spark), nativehf://scans (Polars/DuckDB/pandas) with--timeoutand parallel-job guidance, volume mounts for path-based tools, persisting output to Storage Buckets orpush_to_hub, and a Common Crawl WET end-to-end example. It points to existing pricing, configuration, bucket, and per-library docs instead of duplicating them.Configuration gains a Volumes tip that lazy mounts enable oversized datasets and links to this page.
Reviewed by Cursor Bugbot for commit 7cd203e. Bugbot is set up for automated code reviews on this repo. Configure here.