Files
lancedb/docs/web/training/training-cache.mdx
T
Jack YeandClaude Sonnet 5 de95ed3f6d docs: overhaul curation, feature engineering, security and deployment guides (#4748)
A broad documentation pass across the areas LanceDB Enterprise and
Embedded
diverge on most:

**Data Curation** -- GPU Function execution, Slurm scheduling (and what
Slurm is, for readers new to it), blob late materialization as its own
page, joins, aggregation/profiling, sampling, near-duplicate detection,
chunking, distributed shuffle, and IVF-partition clustering.

**Feature Engineering** -- computed columns and materialized views,
restructured to lead with the Function-based path and show the SQL form
side by side with Python throughout; a single Auto Refresh page instead
of
duplicating scheduling details on every refresh page; adaptive
execution;
checkpointing; GPU and Slurm placement for refresh workers; a Training
Cache page for the PyTorch data loader's automatic cache benefit.

**Security & Governance** -- an Audit Log reference (schema, access,
grants), Secrets promoted to an ordinary catalog object with their own
SQL
DDL and a vending/rotation guide, and privilege-table fixes verified
against the authorization source.

**Deployment & Maintenance** -- Horizontal Scaling and OpenTelemetry
moved
into a real Deployment area; Automated Cleanup folded into Intelligent
Auto-Maintenance (every other maintenance decision already lived there);
RTE Compaction and Advanced Conflict Resolution documented in depth.

**Landing page** -- the Enterprise feature comparison table reorganized
(several redundant or stale rows removed, several new areas added), and
the
"why Enterprise" bullets replaced with ones tied to a concrete page
(Performance, Scale, Fault tolerance, Multicloud deployment, Simplify
operations) instead of vague promises.

Plus a full pass addressing lancedb-gatekeeper's review: a real
test-safety
bug (a quickstart test could silently overwrite and delete a
deployment's
own `frames` table), a fabricated SQL statement with no backing
implementation, an actual dedup-guarantee bug in `take_row_ids`, and
dozens
of documentation-accuracy fixes verified against source rather than
taken
on faith -- each either fixed, or left with an explicit note on why it
needs a feature or deployment owner's sign-off instead of being guessed
at.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_018PXMCbRH6i5w47TsjeEUMT

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-11-03 16:17:24 -08:00

69 lines
3.2 KiB
Plaintext

---
title: "Training Cache"
sidebarTitle: "Training Cache"
description: "Connect the PyTorch data loader to LanceDB Enterprise and training reads automatically benefit from the plan executor's data page cache."
icon: "gauge-high"
keywords: ["training", "dataloader", "cache", "data page cache", "enterprise", "epoch"]
availability:
embedded: unavailable
enterprise: available
---
The [PyTorch data loader](/training/data-loading) reads training data the
same way any other query does -- there is no training-specific read path.
Point `StreamingDataset` or a `DataLoader` at a table opened through an
Enterprise connection instead of a local one, and every read it makes
flows through the same [plan executors](/enterprise/data-page-cache) that
serve every other query, with the same data page cache in front of object
storage. No training-specific configuration turns this on; it's a
consequence of connecting to Enterprise at all.
```mermaid
flowchart LR
DL["PyTorch DataLoader<br/>/ StreamingDataset"] --> T["Enterprise-connected table"]
T --> PE["Plan executor"]
PE --> C{"In data page cache?"}
C -->|hit| Fast["Served from memory<br/>or local disk"]
C -->|miss| O[("Object storage")]
O --> Fill["Fills the cache,<br/>served"]
```
This covers the ordinary tabular columns a query reads -- the data page
cache's unit is a fixed-size page of table data. A [Blob v2](/management/table#managed-blobs)
column's payload is fetched through a separate range-request path keyed
to its own descriptor, not through this cache, so a training table mixing
plain feature columns with Blob v2 images or video gets this benefit only
for the former. A custom collate function or transform that does its own
file or network I/O -- decoding an image, say -- is also outside this
cache; only reads that go through the table query path benefit.
## Why this matters for training specifically {#why}
Training reads the same rows repeatedly: once per epoch, often for many
epochs. The first epoch's reads behave like any cold cache -- a miss per
page, each one filling the cache on the way. Every epoch after that reads
the same pages again, so a dataset that fits the cache's budget serves
almost entirely from memory or local disk after the first pass, instead of
re-reading object storage every epoch. A local-file or Embedded
connection has no equivalent remote cache to warm this way -- its
locality comes from whatever the local filesystem or OS page cache
already does.
[Cache Prewarm](/enterprise/cache-prewarm) extends this further: a plan
executor can warm its cache at startup, before training even begins,
instead of paying the first-epoch cold-cache cost during the run itself.
## What to read next {#next}
<CardGroup cols={2}>
<Card title="PyTorch Data Loader" icon="boxes-stacked" href="/training/data-loading">
Connecting a DataLoader to an Enterprise table.
</Card>
<Card title="Data Page Cache" icon="database" href="/enterprise/data-page-cache">
How the cache a training read benefits from actually works.
</Card>
<Card title="Cache Prewarm" icon="fire" href="/enterprise/cache-prewarm">
Warming the cache before the first epoch instead of during it.
</Card>
</CardGroup>