Skip to content

[python] Allow LeRobot subtask indices without a vocabulary - #11648

Draft
XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-optional-subtasks-20261203
Draft

XiaoHongbo-Hope wants to merge 1 commit into
apache:masterfrom
XiaoHongbo-Hope:codex/lerobot-optional-subtasks-20261203

Conversation

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Purpose

LeRobot frame data may contain subtask_index without meta/subtasks.parquet. The importer currently rejects the entire source, even when consumers only need observations and actions.

Allow that source to load while preserving its original numeric subtask IDs and storing NULL in datasets.subtasks. Readers expose the original IDs with subtask=None. If a combined view contains unresolved subtask IDs, keep source-local IDs throughout that view and omit the global subtask vocabulary and statistics. Sources that omit the subtask feature entirely still combine with sources that provide it. Supplied dictionaries and referenced IDs remain validated; no labels are inferred or IDs rewritten in storage.

This draft is independent of the separate change removing the internal statistics cache column.

Tests

  • LeRobot aggregate, metadata/video, writer, and native-reader regression suites: 469 passed, 9 skipped.
  • Final missing-vocabulary suite: 11 passed, covering single/list import, Ray import, video decoding, nullable IDs, DataLoader masks, append ordering, partial vocabularies, and retained validation.
  • Repository flake8 configuration and git diff --check pass.

The native Rust extension is unavailable in the test environment; applicable reads used the Python fallback.

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