Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/docs/pypaimon/lerobot.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,30 @@ Without `tag_name`, the latest snapshots are used. Frame lookups use the BTree
on `index`; payloads remain lazy. Video decoding prefers TorchCodec, falls back
to PyAV, and reuses a bounded decoder cache. Set `video_backend` to force
either decoder.

Subclass `PaimonDatasetReader` for a custom logical frame layout:

```python
from pypaimon.multimodal import PaimonDatasetReader, PaimonLeRobotDataset

class CustomDatasetReader(PaimonDatasetReader):
def __init__(self, metadata, source, **kwargs):
self._source = source
super().__init__(
metadata,
file_io=getattr(source, "file_io", None),
**kwargs,
)

def read_indices(self, indices, columns):
return self._source.read_indices(indices, columns)

reader = CustomDatasetReader(
metadata, source, delta_timestamps=delta_timestamps
)
dataset = PaimonLeRobotDataset(reader)
```

`source` exposes `read_indices` and optional `file_io`. Pass
`schema=source.schema` for eager schema validation. `PaimonDatasetReader`
reuses the standard Episode, delta-window, media, and Torch handling.
6 changes: 5 additions & 1 deletion paimon-python/pypaimon/multimodal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@
Hdf5File,
Hdf5LoadResult,
)
from pypaimon.multimodal.lerobot.dataset import PaimonLeRobotDataset
from pypaimon.multimodal.lerobot.dataset import (
PaimonDatasetReader,
PaimonLeRobotDataset,
)
from pypaimon.multimodal.rosbag import (
RosbagLoadResult,
RosbagSource,
Expand Down Expand Up @@ -67,6 +70,7 @@
"MultimodalTable",
"NoSuchKey",
"ObjectInfo",
"PaimonDatasetReader",
"PaimonLeRobotDataset",
"PutObjectResult",
"RosbagLoadResult",
Expand Down
6 changes: 5 additions & 1 deletion paimon-python/pypaimon/multimodal/lerobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
"""LeRobot Dataset v3 integration for multimodal Paimon tables."""

from pypaimon.multimodal.lerobot.api import load_from_lerobot
from pypaimon.multimodal.lerobot.dataset import PaimonLeRobotDataset
from pypaimon.multimodal.lerobot.dataset import (
PaimonDatasetReader,
PaimonLeRobotDataset,
)
from pypaimon.multimodal.lerobot.writer import PaimonLeRobotWriter


__all__ = [
"PaimonDatasetReader",
"PaimonLeRobotDataset",
"PaimonLeRobotWriter",
"load_from_lerobot",
Expand Down
Loading
Loading