Macrodata_Labs
AboutBlogDemo
Announcing MacroHands, our SOTA model for 3D hands and camera path from egocentric video!
// Docs›
Quickstart
Running pipelines
  • In-process debugging
  • Local launcher
Reading data
  • Reader model
  • Sharding
  • LeRobot reader
  • HDF5 reader
  • Zarr reader
  • MCAP reader
  • Tabular files
  • Files and videos
  • Hugging Face
  • TensorFlow
  • Lance
  • Custom readers
Episode data
  • Episode rows
  • Frames and videos
  • Metadata, tasks, and stats
  • Converting to robot rows
Transforms
  • Row transforms
  • Async and batch transforms
  • Vectorized transforms
  • Expressions
  • Schemas and DTypes
Episode operations
  • Motion trimming
  • Subtask annotation
Inference
  • Generate text
  • Multimodal and structured output
  • Inference providers
  • Pooling
Writing data
  • Writer model
  • LeRobot writer
  • Zarr writer
  • Parquet and JSONL writers
  • Lance
  • Media assets and reducers
Examples
  • ALOHA HDF5
  • robomimic HDF5
  • Zarr replay buffer
  • MCAP Franka
  • LIBERO HDF5
  • Merge LeRobot datasets
  • Annotate subtasks
Reference
  • Path formats
  • Optional dependencies
// Docs
Quickstart
Running pipelines
  • In-process debugging
  • Local launcher
Reading data
  • Reader model
  • Sharding
  • LeRobot reader
  • HDF5 reader
  • Zarr reader
  • MCAP reader
  • Tabular files
  • Files and videos
  • Hugging Face
  • TensorFlow
  • Lance
  • Custom readers
Episode data
  • Episode rows
  • Frames and videos
  • Metadata, tasks, and stats
  • Converting to robot rows
Transforms
  • Row transforms
  • Async and batch transforms
  • Vectorized transforms
  • Expressions
  • Schemas and DTypes
Episode operations
  • Motion trimming
  • Subtask annotation
Inference
  • Generate text
  • Multimodal and structured output
  • Inference providers
  • Pooling
Writing data
  • Writer model
  • LeRobot writer
  • Zarr writer
  • Parquet and JSONL writers
  • Lance
  • Media assets and reducers
Examples
  • ALOHA HDF5
  • robomimic HDF5
  • Zarr replay buffer
  • MCAP Franka
  • LIBERO HDF5
  • Merge LeRobot datasets
  • Annotate subtasks
Reference
  • Path formats
  • Optional dependencies

LeRobot reader

Read LeRobot datasets as episode rows

Use read_lerobot when your input is already a LeRobot dataset root.

1
2
3
4
5
import refiner as mdr

pipeline = mdr.read_lerobot(
    "hf://datasets/lerobot/aloha_sim_transfer_cube_human",
)

Each output row is a LeRobotRow: one episode with metadata, frame data, and video references attached.

What gets loaded

read_lerobot reads:

Dataset pathUsed for
meta/info.jsonDataset fps, robot type, feature metadata, paths.
meta/stats.jsonExisting feature statistics, when present.
meta/tasks.parquetTask index to task text mapping.
meta/episodes/...Episode-level rows.
data/...Frame-level parquet slices referenced by episodes.
videos/...Video files referenced lazily through row video views.

Videos are not decoded when the dataset is read. They are decoded or copied when a transform or writer needs frames.

Multiple inputs

Pass multiple roots to combine datasets:

1
2
3
4
5
6
pipeline = mdr.read_lerobot(
    [
        "hf://datasets/acme/pick-cubes-a",
        "hf://datasets/acme/pick-cubes-b",
    ]
)

The reader merges metadata and remaps task indices so row tasks stay consistent. For a full recipe, see Merge LeRobot Datasets.

Malformed episodes

read_lerobot validates that each episode's declared frame count matches the frames loaded from its frame parquet. Mismatches raise by default. To drop those episodes instead, pass skip_malformed_rows=True; the reader warns once and records malformed_lerobot_episodes_skipped.

Inspecting rows

1
2
3
4
5
6
row = pipeline.take(1)[0]

print(row.episode_id)
print(row.tasks)
print(row.to_frame_table().names)
print(list(row.videos))

Read Episode Rows and Frames and Videos for the row API.

Sharding options

1
2
3
4
5
pipeline = mdr.read_lerobot(
    "hf://datasets/acme/large-demo-set",
    target_shard_bytes=256 * 1024 * 1024,
    num_shards=64,
)

The shard options apply to episode parquet files under meta/episodes.

Related pages

  • Writing LeRobot
  • Motion Trimming
  • Subtask Annotation

// Table of Contents

  1. What gets loaded
  2. Multiple inputs
  3. Malformed episodes
  4. Inspecting rows
  5. Sharding options
  6. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord