esc
Start typing to search the docs
Navigate Open

Working with Le­Robot datasets

The Rerun Viewer has built-in support for opening LeRobot datasets, the directory-based format used for robot-learning datasets. Both the v2.1 and v3.0 dataset layouts are supported.

Quick start

Loading a LeRobot dataset

A LeRobot dataset is a directory (metadata, parquet, and video files), so point Rerun at the dataset directory:

# View a LeRobot dataset in the Rerun Viewer
rerun path/to/lerobot_dataset

You can also drag and drop the dataset directory into the Rerun Viewer, or load it using the SDK:

"""Load a LeRobot dataset using the Python SDK."""

import sys

import rerun as rr

path_to_lerobot_dataset = sys.argv[1]

# Initialize the SDK and give our recording a unique name
rr.init("rerun_example_load_lerobot", spawn=True)

# Load the LeRobot dataset (a directory of metadata, parquet, and video files)
rr.log_file_from_path(path_to_lerobot_dataset)
recording = rr.get_data_recording()
assert recording is not None
recording.flush()

Data model

Each episode in the dataset is loaded as its own recording. Within an episode, the dataset's features are mapped onto Rerun entities: scalar observations and actions, camera images and videos, and the task descriptions are each logged under their own entity, indexed on a shared timeline.

To go the other way — querying recordings and exporting them as a LeRobot dataset — see Export recordings to LeRobot datasets.