Skip to content

fix(lerobot): bound episode PTS and scope v3 export - #745

Open
victorwon2001 wants to merge 1 commit into
Hebbian-Robotics:mainfrom
victorwon2001:fix/issue-742
Open

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

Conversation

@victorwon2001

@victorwon2001 victorwon2001 commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #742 by tightening the LeRobot video PTS lower-bound tolerance to half a frame and limiting v3 export conversion to the source episodes in the selection. Insufficient video-window PTS packet errors now include the episode index, camera, and metadata time window.

Why

Float quantization could include the prior episode's final frame at the start boundary. Exporting a small selection also converted every source episode, allowing a corrupt unselected episode to block export.

Validation

  • uv run pytest -q tests/test_lerobot_converter.py tests/test_lerobot_export.py — 108 passed.
  • uv run pytest -q tests/test_lerobot_workflow.py — 3 passed.
  • uv run ruff check src/hflow/importers/lerobot.py examples/lerobot/export.py examples/lerobot/workflow.py tests/test_lerobot_converter.py tests/test_lerobot_export.py — passed.
  • uv run ruff format --check src/hflow/importers/lerobot.py examples/lerobot/export.py examples/lerobot/workflow.py tests/test_lerobot_converter.py tests/test_lerobot_export.py — passed.
  • uv run ty check — passed.
  • uv run pytest -q — 2 failed, 2611 passed, 8 skipped. The cache migration test fails independently because ffprobe is not copied; a DuckDB resource-in-use failure in one converter test passed when rerun alone.

Checklist

  • I added or updated outcome-focused tests for changed business logic.
  • I updated documentation for changed behavior, flags, formats, or requirements.
  • 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.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR narrows the video timestamp tolerance and converts only selected episodes during LeRobot export.

  • Episode imports reject video packets more than half a frame before the start.
  • LeRobot v3 exports convert only episodes named in the selection.
  • Short video-window errors name the episode, camera, and time window.

No actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Selected episodes] --> B[Import each selected episode]
  B --> C[Shared revision cache]
  C --> D[Build selected v3 export]
  D --> E[Check staged export]
  E --> F[Publish destination]
Loading

Reviews (1) · Last reviewed commit: "fix(lerobot): bound episode PTS and scop..." · Reviewed by Greptile

@kstonekuan kstonekuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change Fixes #742 to Refs #742? The report also covers repeated --episode-index values, image-only input errors, and the hardcoded workflow manifest; those remain after this fix.

This branch has not been deployed

No deployments
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.

Real-corpus test run: three LeRobot v3 datasets, two breakages and some rough edges

2 participants