Repository navigation
Conversation
Problem:
- Robot learning reads examples, not messages: a clip of a recording,
or a moment inside one, with each topic read over its own window.
- Message rows need a shuffle or a join to rebuild each example.
Change:
- read_mcap(samples=ds, topics={topic: TopicSpec(...)}) reads one row
per sample: its own columns, then each topic's data:, times: and
valid: lists, one entry per step.
- TopicSpec(steps, match=None, pad="edge"). steps.before/after place
steps 1/fps apart around the anchor; steps.last/next/every take the
recorded messages themselves. match.nearest() fills each time step.
The built-ins live in ray.data.datasource.mcap.steps and .match.
- The samples dataset feeds ReadFiles as manifest rows, about 64
samples per task (RAY_DATA_MCAP_SAMPLES_PER_TASK). A task reads only
the chunks its steps need, nearest first.
- A checkpoint keyed on row_id is refused for a sample read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Marwan Sarieddine <sarieddine.marwan@gmail.com>
Problem: - A rerun of a sample read whose samples are all finished crashed: the checkpoint filter left an empty manifest block without the manifest columns, and ReadFiles failed on it. - Samples derived from another read, such as a flat_map over a list of episodes, failed with a KeyError: every read on the path got a checkpoint filter, including the listing, whose rows lack the id. - Samples from from_items were read again and only dropped after the read. Change: - ReadFiles skips a manifest block with no rows. - The planner puts a checkpoint filter only on the read nearest the sink on each path. - ReadFiles(checkpoint_on_input=True) filters its input instead of its output. A sample read sets it, so finished samples are dropped before their files are opened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Marwan Sarieddine <sarieddine.marwan@gmail.com>
Contributor
Author
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 234e217. Configure here.
marwan116
force-pushed
the
marwan/mcap-dsv2-samples
branch
from
October 20, 2026 15:56
e5b773e to
0cc15fb
Compare
Contributor
Author
|
Folded into #67189: resuming a sample read is now part of the sample-rows PR, to keep the stack to four PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Part of the
read_mcapredesign. Stacked on #67189 (#66654 → #67166 → #67167 → #67189 → this PR). It changes the checkpoint planner andReadFiles, so it is kept apart from the reader.Problem. A sample read resumed from a checkpoint keyed on a sample column (
CheckpointConfig(id_column="sample_id")) went wrong three ways:AssertionErrorinFileManifest. The checkpoint filter left an empty block without the manifest columns, andReadFilesfailed on it.flat_mapover a Parquet list of episodes, the rerun failed withKeyError: 'sample_id'. Every read on the path got a checkpoint filter, including the episode listing, whose rows have nosample_id.from_items, every sample was read again, and the finished ones were dropped only after the read.Change.
ReadFilesskips a manifest block with no rows.ReadFiles(checkpoint_on_input=True)filters its input instead of its output. A sample read sets it, because each of its rows comes from one sample and keeps the sample's columns.So finished samples are dropped before their files are opened.
Decisions to confirm:
checkpoint_on_inputas an explicit flag onReadFiles, rather than inferring it from aReadFilesthat has noListFilesupstream.Related issues
Additional information
The new resume tests pass (6); 4 of them fail without this change. test_checkpoint.py: 74 passed, 17 skipped. The MCAP suite: 388 passed, 14 skipped. pre-commit and pyrefly clean.
AI assistance (Claude Code) was used to draft this change; I reviewed every line and ran the tests above locally.
🤖 Generated with Claude Code