refactor(lerobot): type metadata at import boundary - #381
Conversation
|
👋 Hi @victorwon2001 — thanks for the contribution! To keep starter issues available You already have #380 open, so this one is being closed automatically. |
|
Heads-up for when you reopen this: #383 landed a few minutes ago and rewrote the same region. 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. |
Summary
Parse LeRobot
meta/info.jsononce 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— passeduv run ruff format— passeduv run ty check— passeduv run pytest -q tests/test_lerobot_converter.py— 47 passeduv run pytest -q— 1452 passed, 6 skippedgit diff --check— passedChecklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.