Skip to content

[python] Separate single-source and multi-source LeRobot readers - #11713

Draft
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-single-multi-readers-20261206
Draft

XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-single-multi-readers-20261206

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

PaimonLeRobotDataset currently combines every source in a table group. Even dataset_index only restricts the Episodes being sampled; its metadata, indices, vocabularies and statistics still describe the combined group.

Split the public interfaces:

  • PaimonLeRobotDataset reads one source, selected by its stored dataset_id UUID or dataset_index. It uses source-local indices and Episode selection, original vocabularies/FPS, and stored Dataset statistics. A group with one source needs no selector.
  • PaimonMultiLeRobotDataset explicitly retains the existing whole-group reader with global indices and combined metadata.

For example, selecting source B now returns its first frame as index=0, with B's statistics, rather than the group's frame offset and merged statistics. Calling the single-source class on a group with multiple sources requires an explicit selector; callers that want combined training migrate to the new class.

The two paths share indexed frame lookup, batched media decoding and DataLoader support. This PR changes no table schemas or source association keys. The persisted statistics-cache removal remains in #11649.

Validation

  • LeRobot aggregate, metadata/video, writer and native-reader regression suites: 472 passed, 9 skipped (Python execution; the Rust runtime is unavailable locally).
  • Selection by UUID/index, local Episode windows, independent vocabularies/statistics/features, missing statistics, tagged reads and metadata pickling are covered.
  • Real DataLoader tests include zero workers and two spawn workers; existing combined-reader/video regressions migrate to the explicit multi-source class.
  • Repository flake8 configuration, Python 3.6 production syntax, and git diff --check pass.

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