Skip to content

[python] Add direct LeRobot capture writer - #9665

Draft
YannByron wants to merge 1 commit into
apache:masterfrom
YannByron:codex/lerobot-direct-writer
Draft

[python] Add direct LeRobot capture writer#9665
YannByron wants to merge 1 commit into
apache:masterfrom
YannByron:codex/lerobot-direct-writer

Conversation

@YannByron

Copy link
Copy Markdown
Contributor

Summary

Add a LeRobot recording-loop compatible writer that sends captured frames directly to a Paimon multimodal table without materializing an intermediate LeRobot dataset.

Changes

  • Add PaimonLeRobotWriter with add_frame, episode save/discard, explicit flush, and finalize lifecycle methods.
  • Batch completed episodes into one Paimon commit (10 by default) while keeping episode/global/task indices deterministic.
  • Encode image features as PNG BLOBs; MP4/video features remain unsupported in this first version.
  • Document the direct-capture API and validate frames, images, schemas, failure states, and tail-batch commits.

Testing

  • python3 -m unittest pypaimon.tests.multimodal_lerobot_writer_test pypaimon.tests.multimodal_lerobot_test (56 run, 24 optional LeRobot integration tests skipped)
  • python3 -m ruff check pypaimon/multimodal/lerobot/writer.py pypaimon/multimodal/lerobot/loader.py pypaimon/tests/multimodal_lerobot_writer_test.py
  • git diff --check

Notes

This draft intentionally starts with PNG image frames, synchronous encoding, and new or empty target tables. MP4 encoding, restart/resume state, and streaming-checkpoint semantics are deferred.

Add a LeRobot-compatible writer that batches completed episodes into multimodal Paimon commits and stores image frames as PNG BLOBs.

Co-Authored-By: Codex <noreply@anthropic.com>

AI-Model: gpt-5

AI-Contributed/Feature: 360/360

AI-Contributed/UT: 228/228
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