# Rerun Lerobot

Ingest a LeRobot (HuggingFace) dataset into Rerun.

- Repository: https://github.com/rerun-io/rerun (11675 stars)
- Category: Data and ML
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add rerun-io/rerun --skill rerun-lerobot -g -a claude-code -y`
Codex: `npx skills add rerun-io/rerun --skill rerun-lerobot -g -a codex -y`
Cursor: `npx skills add rerun-io/rerun --skill rerun-lerobot -g -a cursor -y`
Gemini CLI: `npx skills add rerun-io/rerun --skill rerun-lerobot -g -a gemini-cli -y`

## Description

Ingest a LeRobot (HuggingFace) dataset into Rerun. Read when converting a LeRobot dataset to RRDs, splitting it into per-episode segments, or registering it on a Rerun catalog. Covers the built-in directory importer (log_file_from_path), the per-episode LeRobotReader, and when to drop to ParquetReader for custom control.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Rerun LeRobot ingestion

There are two ways in, and which one you want depends on whether you are viewing or converting.

- **Just viewing?** Rerun has a **built-in LeRobot importer**: point `log_file_from_path` (or the viewer, or `rerun <dir>` on the CLI) at the dataset _directory_ and it ingests episodes, camera videos, and state/action tables with no conversion code.
- **Converting?** `rr.experimental.LeRobotReader` reads the dataset one episode at a time as a lazy chunk stream, which is what you want for per-episode RRDs and for lenses.

The download step needs `huggingface_hub`.

## Step 0: pick a dataset and check the HF token

Both scripts below live in `scripts/` next to this file, and run standalone through `uv`, they declare `huggingface_hub` inline, so there is no environment to set up.

Two facts decide what a dataset costs to fetch, and the Hub search results show neither.
Get both, for every candidate, in one call:

```bash
uv run scripts/find_lerobot_dataset.py <query> --robot-type <robot> --want 5
```

**`codebase_version` decides whether a partial download is possible at all.**

- **v2.1 and earlier** store one parquet and one mp4 per episode (`video_path` ends in `episode_{episode_index:06d}.mp4`), so "just the first N episodes" downloads only those episodes.
- **v3.0** concatenates every episode into a few large files (`video_path` ends in `file-{file_index:03d}.mp4`), so any subset costs the whole download.
  If the user asked for a few episodes, prefer a v2.1 dataset, for the _download_ only.
  `LeRobotReader` reads a single episode out of either version once the files are local.

**How camera frames are stored decides the size**, and it varies by two orders of magnitude.
The `frames` and `MB/ep` columns report it:

- `mp4`: a `video`-dtype feature, one file per episode beside the parquet.
- `inline`: an `image`-dtype feature, raw frames inside the episode parquet, which is far larger for the same footage.

The rest: https://github.com/rerun-io/rerun/blob/HEAD/skills/rerun-lerobot/SKILL.md
