Skip to content

[python] Speed up LeRobot worker startup with lazy fallback splits - #10732

Merged
JingsongLi merged 3 commits into
apache:masterfrom
XiaoHongbo-Hope:python-lerobot-lazy-worker-splits
Oct 22, 2026
Merged

JingsongLi merged 3 commits into
apache:masterfrom
XiaoHongbo-Hope:python-lerobot-lazy-worker-splits

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Purpose

Native LeRobot readers still pickle the Python fallback splits into each spawned worker, even when those splits are never used. Omit them when native planning or reading is enabled, and rebuild them from the pinned snapshot only if Python fallback is needed. Python-only readers retain their splits and fallback scanners remain reusable across batches.

This addresses a worker-startup bottleneck found in the public Koch LeRobot benchmark: first-batch time fell from about 24.78 s to 4.87 s in the earlier local experiment (8 forkserver workers, batch 32). These are experiment results, not a fresh benchmark of this PR head.

Tests

  • Native reader coverage includes spawn, pickle, pinned snapshots, both native options, fallback scanner reuse, projection-sensitive authorization, and Python-only reads.
  • Repository flake8, Python 3.6 syntax compilation, and git diff --check passed.

@XiaoHongbo-Hope
XiaoHongbo-Hope marked this pull request as ready for review October 21, 2026 16:33
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 5a10cf2 into apache:master Oct 22, 2026
8 of 18 checks passed
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.

2 participants