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

In-process debugging

Inspect Refiner pipelines directly in the current Python process

In-process execution is the fastest way to validate a reader, inspect row shape, or test a transform. It does not use the local launcher worker supervisor.

Inspect one row

1
2
3
4
5
6
7
8
import refiner as mdr

pipeline = mdr.read_lerobot("hf://datasets/macrodata/aloha_static_battery_ep005_009")
row = pipeline.take(1)[0]

print(row.episode_id)
print(row.num_frames)
print(row.to_frame_table().names)

Use this before writing transforms. It answers the most important question: "What keys and semantic properties does my row actually expose?"

Iterate lazily

1
2
3
for row in pipeline.iter_rows():
    print(row.episode_id, row.num_frames)
    break

iter_rows() streams rows from the source through all transforms. It is useful for long datasets because it does not materialize the whole pipeline.

Materialize small fixtures

1
rows = pipeline.take(5)

Prefer take() over materialize() unless the dataset is intentionally tiny. materialize() computes every output row into memory.

Debug a transform

1
2
3
4
5
def show_shape(row):
    print(row.episode_id, row.num_frames)
    return row

pipeline.map(show_shape).take(3)

Keep debug transforms small and remove them before launching real jobs.

Sinks in process

Sinks do not write through in-process inspection methods like take() or iter_rows(). Inspect the pipeline before attaching the sink:

1
2
3
4
source = mdr.read_lerobot("hf://datasets/macrodata/aloha_static_battery_ep005_009")
trimmed = source.map(mdr.robotics.motion_trim(threshold=0.001))

print(trimmed.take(1)[0].num_frames)

Attach the writer when you are ready to launch the pipeline:

1
pipeline = trimmed.write_lerobot("hf://buckets/acme-robotics/aloha_trimmed")

Related pages

  • Episode Rows
  • Row Transforms
  • Motion Trimming

// Table of Contents

  1. Inspect one row
  2. Iterate lazily
  3. Materialize small fixtures
  4. Debug a transform
  5. Sinks in process
  6. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord