Skip to content

fix: support lerobot >= 0.6.0 in the hw_to_dataset_features import seam#21

Merged
aris-zhu merged 1 commit into
mainfrom
lerobot-06-seam
Jul 14, 2026
Merged

fix: support lerobot >= 0.6.0 in the hw_to_dataset_features import seam#21
aris-zhu merged 1 commit into
mainfrom
lerobot-06-seam

Conversation

@aris-zhu

Copy link
Copy Markdown
Contributor

What

lerobot 0.6.0 moved hw_to_dataset_features from lerobot.datasets.feature_utils to lerobot.utils.feature_utils, which breaks LeRobotPolicy loading against 0.6.x (both prior import paths raise). This extends _import_hw_to_dataset_features() to try the 0.6 location first, then fall back to the 0.5.1 and 0.5.0 layouts. The call-site signature is unchanged across versions ((hw_features, prefix, use_video)).

Why now

Hit in the field: running this plugin against a lerobot main checkout (0.6.1) on an SO-101 follower. With this fix the full stack (SO-101 + smolvla_base, in-process inference) runs end-to-end on hardware against 0.6.1.

Tests

_install_lerobot_fakes now models the three layouts via feature_layout ("v060" default / "v051" / "v050"); the default flip means most tests exercise the new path, with explicit fallback tests for both older layouts. Gates: ruff, ruff format, pytest (82 passed, 100% coverage), mypy strict — all green locally.

Notes / out of scope

  • The lerobot extra keeps its <0.6 cap: 0.6.x also gates previously-bundled deps behind extras that surface lazily at policy-load time (grpcio via lerobot[async] at import of lerobot.async_inference, datasets via lerobot[dataset]). Users on 0.6.x must install those alongside; lifting the cap properly (extra-of-extras + seam CI matrix against both majors) is a follow-up.

🤖 Generated with Claude Code

lerobot 0.6.0 moved hw_to_dataset_features from
lerobot.datasets.feature_utils to lerobot.utils.feature_utils, breaking
policy loading against 0.6.x. Extend the version seam to try the new
location first, falling back to the 0.5.1 and 0.5.0 layouts.

Verified live on hardware against lerobot 0.6.1 (SO-101 follower +
smolvla_base end-to-end). Note 0.6.x also gates previously-bundled deps
behind extras at import/load time (grpcio via lerobot[async],
datasets via lerobot[dataset]) — install those alongside.

Test fakes now model all three layouts via feature_layout
("v060" default / "v051" / "v050"), with explicit fallback tests for
both older layouts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@aris-zhu
aris-zhu merged commit c4dc23c into main Jul 14, 2026
12 checks passed
@aris-zhu
aris-zhu deleted the lerobot-06-seam branch July 14, 2026 16:09
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