LeRobot Dataset
SUMMARY
LeRobotDataset is the Telekinesis Data Engine interface for working with LeRobot v3 datasets. It supports creating, writing, loading, inspecting, and visualizing robot datasets containing synchronized observations, robot state, actions, and task annotations.
Install
Install the LeRobot dependencies for the Data Engine:
pip install "telekinesis-ai[dataengine-lerobot]"When to Use LeRobotDataset
Use LeRobotDataset when you want to:
- Create a LeRobot v3 dataset programmatically
- Write robot observations, actions, and task data into episodes
- Load an existing local or Hugging Face dataset
- Read frames for training or analysis
- Inspect dataset metadata and feature definitions
- Visualize recorded robot demonstrations
- Resume writing to an existing writable dataset
For live episode-based data collection, use LeRobotDatasetLogger instead.
What Does LeRobotDataset Provide?
LeRobotDataset provides the dataset layer for LeRobot v3 data, handling storage, metadata, frame access, and writable dataset operations through a single interface.
| Capability | Description |
|---|---|
| Create | Create a new LeRobot dataset from a frame rate and feature schema. |
| Read | Access individual frames through the dataset interface. |
| Load | Open datasets from a local path or supported remote repository. |
| Write | Add frames and save episodes to a writable dataset. |
| Inspect | Read metadata, features, episode information, and dataset properties. |
| Visualize | Inspect recorded observations and actions visually. |
| Resume | Reopen an existing dataset for additional writes. |
How a LeRobot Dataset Is Structured
A LeRobot dataset stores robot demonstrations as a collection of episodes.
Each episode contains a time-ordered sequence of frames.
Each frame follows the dataset's feature schema and can contain synchronized values such as:
- camera observations
- robot state
- actions
- additional sensor observations
- task information
Conceptually, the dataset is organized as:
LeRobot Dataset
│
├── Episode 0
│ ├── Frame 0
│ ├── Frame 1
│ ├── ...
│ └── Frame N
│
├── Episode 1
│ ├── Frame 0
│ ├── Frame 1
│ └── ...
│
└── Episode NThe feature schema defines what every frame contains, including each feature's data type, shape, and dimension names.
{
"observation.camera_rgb": {
"dtype": "video",
"shape": [3, 64, 64],
"names": ["channels", "height", "width"],
},
"observation.state": {
"dtype": "float32",
"shape": [7],
"names": [
"joint_1",
"joint_2",
"joint_3",
"joint_4",
"joint_5",
"joint_6",
"gripper_state",
],
},
"action": {
"dtype": "float32",
"shape": [7],
"names": [
"joint_1",
"joint_2",
"joint_3",
"joint_4",
"joint_5",
"joint_6",
"gripper",
],
},
}Storage Layout
On disk, LeRobot separates frame data, visual streams, and dataset metadata:
dataset_name/
├── .cache/
├── data/
│ └── chunk-000/
├── meta/
│ ├── episodes/
│ │ └── chunk-000/
│ │ ├── file-000.parquet
| | ├── ...
│ │ └── file-00n.parquet
│ ├── info.json
│ ├── stats.json
│ └── tasks.parquet
├── videos/
│ ├── observation.images.camera1/
│ │ └── chunk-000/
| | ├── ...
│ └── observation.images.camera3/
│ └── chunk-000/
├── .gitattributes
└── README.md| Location | Purpose |
|---|---|
data/ | Stores frame-level non-visual data in Parquet shards. |
videos/ | Stores encoded visual observations, organized by camera feature. |
meta/info.json | Stores dataset-level information such as the feature schema, frame rate, and storage layout. |
meta/stats.json | Stores dataset statistics used for inspection and normalization. |
meta/episodes/ | Stores per-episode metadata such as episode lengths and task associations. |
meta/tasks.parquet | Stores task descriptions and their dataset mappings. |
Guides
Use the guides below depending on whether you want to create, write, load, inspect, or visualize a LeRobot dataset.
Create a LeRobot Dataset
Create a new writable LeRobot dataset from a frame rate, robot type, and feature schema.
Create dataset →Write to a LeRobot Dataset
Add frames, save episodes, and finalize a writable LeRobot dataset.
Write data →Load a LeRobot Dataset
Open an existing local or remote LeRobot dataset and access its frames.
Load dataset →Inspect Dataset Metadata
Inspect feature definitions, frame rate, robot type, episodes, and other dataset metadata.
Inspect metadata →Visualize a LeRobot Dataset
Visualize recorded observations and actions to inspect the contents of a dataset.
Visualize dataset →