Skip to main content

lerobot-lancedb

📖 Docs: https://lancedb.github.io/lerobot-lancedb/

Lance-backed datasets for LeRobot. Drop-in replacement for LeRobotDataset with two storage layouts:

  • LeRobotLanceDataset — per-frame JPEG bytes (lossy, fastest at single-frame access, optional GPU NVJPEG decode).
  • LeRobotLanceVideoDataset — per-file mp4 bytes stored via Lance blob v2, decoded on the fly with torchcodec. Bit-exact pixels, ~same disk size as upstream.

Both subclass LeRobotDataset so existing trainers / samplers / isinstance checks accept them transparently.

Install

pip install lerobot-lancedb

For local development:

git clone https://github.com/lancedb/lerobot-lancedb.git
cd lerobot-lancedb
pip install -e '.[dev]'

Quickstart

# Convert (recommended path for dtype=video sources)
lerobot-convert-to-lance-video \
    --repo-id=lerobot/aloha_static_cups_open \
    --output=./aloha_cups_open_lance_video --overwrite
from lerobot_lancedb import LeRobotLanceVideoDataset
ds = LeRobotLanceVideoDataset(root="./aloha_cups_open_lance_video")

For the JPEG layout, use lerobot-convert-to-lance and LeRobotLanceDataset instead. See the docs for the full CLI / API reference.

Benchmark

Realistic training read pattern (delta_timestamps, 8 frames / sample, batch 32, num_workers 4, CPU decode, H100):

dataset format size MB delta_ts fps speedup
pusht (96×96, 1-cam) upstream parquet+mp4 7.3 750 1.00×
convert_to_lance (JPEG-95) 60.0 3510 4.68×
convert_to_lance --jpeg-quality=100 --jpeg-subsampling=0 105.6 2909 3.88×
convert_to_lance_video 8.0 2853 3.80×
ALOHA cups_open (480×640, 4-cam) upstream parquet+mp4 485.6 18.7 1.00×
convert_to_lance (JPEG-95) 3626.0 46.0 2.46×
convert_to_lance --jpeg-quality=100 --jpeg-subsampling=0 8735.4 32.5 1.74×
convert_to_lance_video 487.4 45.6 2.44×
Koch lego (480×640, 2-cam) upstream parquet+mp4 2014.1 26.6 1.00×
convert_to_lance (JPEG-95) 8541.0 70.8 2.66×
convert_to_lance --jpeg-quality=100 --jpeg-subsampling=0 17 335.3 49.0 1.84×
convert_to_lance_video 2015.9 53.8 2.02×

Reproducible via examples/benchmark_formats.py.

Training parity

convert_to_lance_video trains a DiffusionPolicy on pusht to 68.4 % gym-pusht success (seed=42, 500 rollouts) — matches the head-to-head upstream parquet+mp4 result (68.0 %) and the published lerobot/diffusion_pusht (65.4 %).

Full numbers (pusht env-eval + ALOHA cups_open held-out MSE across all storage modes) in docs/benchmarks.md. Reproducers: examples/train_and_eval_lance.py and examples/aloha_loader_parity.py.

Cloud / Hub

Both readers accept s3://, gs://, hf://datasets/..., hf://buckets/... URIs and pick up credentials from the usual env vars (AWS_*, GOOGLE_APPLICATION_CREDENTIALS, HF_TOKEN). Lance does byte-range fetches — no full-dataset download.

Pre-converted reference datasets you can paste directly:

from lerobot_lancedb import LeRobotLanceDataset, LeRobotLanceVideoDataset

LeRobotLanceDataset(repo_id="lance-format/pusht-lerobot-lancedb")        # 60 MB JPEG layout
LeRobotLanceVideoDataset(repo_id="lance-format/pusht-lerobot-lancedb-video")  # 8 MB video-blob layout

License

Apache 2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lerobot_lancedb-0.2.1.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lerobot_lancedb-0.2.1-py3-none-any.whl (44.0 kB view details)

Uploaded Python 3

File details

Details for the file lerobot_lancedb-0.2.1.tar.gz.

File metadata

  • Download URL: lerobot_lancedb-0.2.1.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for lerobot_lancedb-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1a94204d96a9a5cfd0e7cfa3a576e9b21a60b1432657b085845ca2a9efbf1938
MD5 efdd21699c04d063d7031f808669cc63
BLAKE2b-256 806ab29a9e3877cf88f8f0b7d42e863e7c28281eba2808c0780a26ce64c50362

See more details on using hashes here.

File details

Details for the file lerobot_lancedb-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lerobot_lancedb-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55c20287ade5de41d59067572ef3f12d37246bd60e1f1a453e2689516980f3cd
MD5 a93ae45cc6fce06168c8c69131ebfa1e
BLAKE2b-256 bc24dee2aeb0ca9486eb1e5d3065965f92d352d9c0b16e2d77e9feca65919fed

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page