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 writer

Write Refiner episode rows as LeRobot datasets

Use write_lerobot to write LeRobotRow or generic RoboticsRow values as a LeRobot dataset.

1
2
3
4
5
pipeline = (
    mdr.read_lerobot("hf://datasets/acme/raw")
    .map(mdr.robotics.motion_trim(threshold=0.001))
    .write_lerobot("hf://buckets/acme-robotics/trimmed")
)

Input requirements

Rows must be one of:

Row typeHow to get it
LeRobotRowread_lerobot(...)
RoboticsRowto_robot_rows(...) from HDF5, Zarr, files, or custom readers

Plain rows should be adapted before writing; see Converting to Robot Rows. If a generic RoboticsRow has no episode id, the writer generates one from the shard id and row position.

Output layout

The writer creates LeRobot-compatible data:

Output pathContent
data/chunk-.../file-...parquetFrame rows.
videos/<key>/chunk-.../file-...mp4Video streams when rows include videos.
meta/episodes/...Episode rows.
meta/tasks.parquetTask table.
meta/info.jsonDataset metadata.
meta/stats.jsonFeature statistics after reducer finalization.

Video behavior

The writer can remux compatible clipped videos instead of decoding and re-encoding them. It transcodes when required by format, clipping, stale stats, or writer options.

1
2
3
pipeline.write_lerobot(
    "hf://buckets/acme-robotics/output",
)

Performance knobs

OptionUse it for
data_files_size_in_mbTarget frame parquet file size.
video_files_size_in_mbTarget video file size.
codecVideo codec for transcoded videos. Defaults to mpeg4.
pix_fmtPixel format for transcoded videos. Defaults to yuv420p.
max_video_prepare_in_flightBound concurrent episode video preparation per worker. Defaults to 4.
quantile_binsAccuracy/cost tradeoff for video stats quantiles.
force_recompute_video_statsRecompute stats even when existing stats could be reused.

Related pages

  • Metadata, Tasks, and Stats
  • Media Assets and Reducers
  • Merge LeRobot Datasets

// Table of Contents

  1. Input requirements
  2. Output layout
  3. Video behavior
  4. Performance knobs
  5. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord