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

Tabular files

Read Parquet, JSON, JSONL, and CSV files

Use tabular readers when your input already has row-shaped records.

Parquet

1
2
3
4
pipeline = mdr.read_parquet(
    "/data/episodes/*.parquet",
    file_path_column="source_file",
)

Parquet is the best general-purpose tabular format when you control the data. It preserves schema information and works well with vectorized transforms.

For rows with large or variable-sized values, set the pipeline-wide execution block limit:

1
pipeline = mdr.read_parquet("/data/episodes/*.parquet").with_max_block_rows(256)

Refiner passes this limit to the Parquet scanner and also enforces it on downstream execution blocks. Parquet may still emit smaller batches at file or row-group boundaries.

To tune Parquet scanning independently, set read_batch_rows:

1
2
3
4
pipeline = mdr.read_parquet(
    "/data/episodes/*.parquet",
    read_batch_rows=4_096,
).with_max_block_rows(256)

The explicit read setting controls Parquet scanner batches; the pipeline limit continues to cap downstream execution blocks.

JSON and JSONL

1
2
json_pipeline = mdr.read_json("/data/episodes/*.json")
jsonl_pipeline = mdr.read_jsonl("/data/episodes/*.jsonl")

Use JSONL for large line-delimited datasets. It can be split more naturally than one large JSON document.

CSV

1
2
3
4
pipeline = mdr.read_csv(
    "/data/annotations/*.csv",
    multiline_rows=False,
)

CSV is useful for metadata and labels. Prefer Parquet for nested arrays, frame data, or typed feature columns.

DTypes

Use dtypes when the source format needs help describing a column:

1
2
3
4
pipeline = mdr.read_parquet(
    "/data/videos.parquet",
    dtypes={"video": mdr.datatype.video_path()},
)

See Schemas and DTypes.

Related pages

  • Vectorized Transforms
  • Parquet and JSONL Writers

// Table of Contents

  1. Parquet
  2. JSON and JSONL
  3. CSV
  4. DTypes
  5. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord