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

Episode rows

The episode-level row model used by Refiner

Refiner exposes robotics data as rows. A row may be a plain mapping, a RoboticsRow semantic view, or a LeRobotRow.

Plain rows

Generic readers emit regular rows:

1
2
row = mdr.read_parquet("/data/episodes.parquet").take(1)[0]
print(row["episode_id"])

Plain rows are enough for tabular transforms. Robotics operations usually need a semantic episode view.

RoboticsRow

RoboticsRow is a protocol: it describes what an episode row can do without requiring one physical storage format.

Common properties:

PropertyMeaning
episode_idStable episode identifier.
num_framesNumber of frame rows.
taskOptional task text.
fpsOptional frame rate.
robot_typeOptional robot family/type.
timestampsFrame-aligned timestamps.
actionsFrame-aligned actions.
statesFrame-aligned state observations.
videosMapping of video key to video source.
statsFeature statistics when available.

LeRobotRow

read_lerobot(...) emits LeRobotRow values:

1
2
3
4
5
row = mdr.read_lerobot("hf://datasets/lerobot/aloha_sim_transfer_cube_human").take(1)[0]

print(row.episode_index)
print(row.tasks)
print(row.metadata.info.fps)

LeRobotRow is also a RoboticsRow, so episode operations such as Motion Trimming can use it directly.

Updating rows

Rows are immutable-style values: update methods return new rows.

1
2
def add_quality_flag(row):
    return row.update({"quality": "ok"})

Frame-aware rows also provide helpers:

1
2
def zero_actions(row):
    return row.with_actions([[0.0] for _ in range(row.num_frames)])

Selecting frames

1
2
3
def first_second(row):
    count = int((row.fps or 30) * 1.0)
    return row.select_frames(range(min(count, row.num_frames)))

Selecting frames updates the frame table. For LeRobotRow, frame indices are renumbered when present.

Related pages

  • Frames and Videos
  • Row Transforms
  • Writing LeRobot

// Table of Contents

  1. Plain rows
  2. RoboticsRow
  3. LeRobotRow
  4. Updating rows
  5. Selecting frames
  6. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord