Skip to content

Update from code changes: document write_parallelism on add() - #312

Closed
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/cc9d84eb
Closed

Update from code changes: document write_parallelism on add()#312
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/cc9d84eb

Conversation

@mintlify

@mintlify mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

The Python add() method now exposes a write_parallelism parameter to cap the number of parallel write partitions, and automatically bounds scan batch size and read-ahead for wide-row pyarrow.dataset.Dataset inputs so bulk ingestion no longer OOMs the client on wide embedding columns. This PR documents the new knob and the auto-bounded behavior in the Ingestion section of the Performance Tips page. See lancedb/lancedb#3625.

Changes

  • Added a "Bounding memory on wide-row uploads" subsection under Ingestion in docs/performance.mdx, covering when to use write_parallelism, its default, and a code example.
  • Noted that Dataset inputs are auto-sized against a ~1 GiB in-flight budget while narrow inputs keep PyArrow defaults.

@mintlify

mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟢 Ready View Preview Jul 17, 2026, 2:45 PM

@mintlify

mintlify Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟡 Building Jul 17, 2026, 2:43 PM

@wjones127

Copy link
Copy Markdown
Contributor

Opened an alternative in #313 — reframes write_parallelism around write bandwidth rather than just memory, documents the progress=True progress bar, and covers why scanning a file-backed Dataset is preferable to a hand-built RecordBatchReader for larger-than-memory ingestion.

@wjones127 wjones127 closed this Jul 17, 2026
AyushExel pushed a commit that referenced this pull request Jul 26, 2026
* docs: rewrite write performance/ingestion section

Reworks the Ingestion section on the Performance Tips page:

- Frames write_parallelism around its main benefit (bandwidth), not
  just memory, and documents the progress=True tqdm bar (throughput
  and active worker count) that was previously undocumented.
- Clarifies that for larger-than-memory data, scanning a file-backed
  Dataset is preferable to a hand-built RecordBatchReader: only a
  Dataset can be counted and rescanned, which enables auto-sized
  parallelism and retry-on-failure.
- Adds write_parallelism guidance for iterator ingestion, where LanceDB
  can't auto-size it, including a rule of thumb to avoid over-
  fragmenting small datasets.

Alternative to #312, which framed write_parallelism as primarily a
memory-capping knob and didn't mention the progress bar.

* docs: show sample tqdm output for progress=True

* docs: narrow iterator ingestion to on-the-fly transforms

Drops the memory-bound framing (iterator ingestion isn't really about
memory) and scopes the section to data that needs per-row work before
writing, rather than streaming sources generally. Calls out setting
write_parallelism manually for large inputs in its own note.

* docs: tighten ingestion section prose

Trims repeated reasoning (bandwidth benefit, Dataset vs RecordBatchReader
rescan/retry logic) that was restated across paragraphs.

* docs: fix embeddings example, drop wide-row scan memory note

Embedding computation is built into the ingestion pipeline, so it's a
misleading example of when you'd need to hand-roll an iterator instead
of scanning a file-backed Dataset. Swaps it for a generic "custom data
transformations" example in both places it appeared.

Also drops the wide-row scan memory bounding note for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant