Skip to content

refactor(lerobot): type metadata at import boundary - #381

Closed
victorwon2001 wants to merge 1 commit into
Hebbian-Robotics:mainfrom
victorwon2001:fix/issue-320
Closed

refactor(lerobot): type metadata at import boundary#381
victorwon2001 wants to merge 1 commit into
Hebbian-Robotics:mainfrom
victorwon2001:fix/issue-320

Conversation

@victorwon2001

Copy link
Copy Markdown
Contributor

Summary

Parse LeRobot meta/info.json once into frozen internal dataset, episode, video-window, and numeric-feature values while keeping the downloaded JSON cache unchanged. Conversion now consumes those typed values directly, with existing paths, schemas, provenance, manifest contents, revision namespacing, and video-cache behavior preserved.

Why

LeRobot feature specifications remained as nested raw dictionaries after the external JSON boundary, allowing metadata interpretation to be repeated later in discovery and conversion. Moving supported validation and normalization to the boundary makes invalid supported shapes unrepresentable internally without expanding dtype/rank support or changing canonical output behavior.

Fixes #320

Validation

  • uv run ruff check --fix — passed
  • uv run ruff format — passed
  • uv run ty check — passed
  • uv run pytest -q tests/test_lerobot_converter.py — 47 passed
  • uv run pytest -q — 1452 passed, 6 skipped
  • git diff --check — passed

Checklist

  • I added or updated outcome-focused tests for changed business logic.
  • I updated documentation for changed behavior, flags, formats, or requirements. Not applicable: this keeps the public behavior and formats unchanged.
  • I ran uv run ruff check --fix, uv run ruff format, and uv run ty check.
  • I ran the relevant pytest suite.
  • I did not add recordings, generated media, credentials, private URLs, or runtime artifacts.
  • I preserved stored-data compatibility or documented an explicit version change.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

👋 Hi @victorwon2001 — thanks for the contribution! To keep starter issues available
for other contributors and give every pull request a real review, we accept
1 open pull request per contributor at a time.

You already have #380 open, so this one is being closed automatically.
Once your open pull request is merged or closed, feel free to reopen this one —
no work is lost.

@github-actions github-actions Bot closed this Sep 3, 2026
@kstonekuan

Copy link
Copy Markdown
Contributor

Heads-up for when you reopen this: #383 landed a few minutes ago and rewrote the same region. _ensure_source_archive now reads episode rows, video columns, and video windows from one read_parquet([...], union_by_name=true) relation over every meta/episodes shard instead of the first, and CONVERTER_VERSION moved to v5. Expect a real conflict rather than a clean rebase.

Nothing here is wasted. #320 asks for the metadata to be typed at the boundary, and #383 only changed where the rows come from, not what is done with them once read. The boundary is arguably cleaner to type now that there is one relation instead of a per-file loop.

On the ordering: the cap is one open pull request at a time, so #381 and #384 both closed on open. That is working as intended, but it means the queue is yours to sequence. #380 is the one currently open and it is waiting on you, so the cheapest path is to land or close that first, then reopen whichever of these two you want next. Both issues are still unassigned and unclaimed.

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.

Parse LeRobot metadata into a typed internal archive model

2 participants