Registry / ai-ml / lerobot

lerobot

JSON →
library0.5.1pypypiunverified

LeRobot is a state-of-the-art open-source Python library for real-world robotics using PyTorch, developed by Hugging Face. It provides tools for creating robot environments, loading pre-trained policies, and managing robotics datasets. It is currently at version 0.5.1 and is under active development, with new releases often including significant updates and breaking changes.

pip install lerobot
INSTALL
IMPORT
SIG · LEROBOT
L
lerobot
ai-mlpythonv0.5.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
build_error
glibc
py 3.103.920 runs
timeout
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

load_policy
from lerobot import load_policy
from lerobot import load_policy

This quickstart demonstrates how to load a pre-trained robotics policy from the Hugging Face Hub and use it to sample actions in a dummy environment. It showcases the core `load_policy` and `RobotEnvFactory` components.

from lerobot.common.policies.hf_hub.load import load_policy from lerobot.common.robot_env_factory import RobotEnvFactory import torch # Load a pre-trained policy from the Hugging Face Hub # This example uses a public model, so no explicit token is needed unless fine-tuning. policy = load_policy("lerobot/diffusion_policy_v2_pen_push_multi_view_taco_play_sok_fixed_camera_v0") # Create a dummy robot environment for demonstration # Real environments require specific configurations like 'robomimic', 'taco_play', etc. # e.g., env = RobotEnvFactory("taco_play", record_dir="./recordings")() env = RobotEnvFactory("dummy")() # Reset the environment to get initial observation obs = env.reset() # Sample actions from the policy with torch.no_grad(): action = policy.sample_actions(obs) print(f"Initial observation keys: {obs.keys()}") print(f"Sampled action shape: {action.shape}") env.close()
Debug
Known issues
breakingThe `DatasetFactory` now requires the `root_dir` argument to be explicitly provided during instantiation. It was previously optional.
fix
Ensure `DatasetFactory` is called with `DatasetFactory(root_dir='/path/to/data')`. For instance, `DatasetFactory("hf_dataset_id", root_dir="./data")`.
affects: >=0.5.0
breakingThe `hf_hub_id` argument in functions like `load_policy` has been renamed to `repo_id` for consistency with Hugging Face Hub terminology.
fix
Replace `hf_hub_id='your/model'` with `repo_id='your/model'` when loading policies or datasets from the Hugging Face Hub.
affects: >=0.5.0
breakingThe signature and name of the policy sampling method have changed. `policy.sample()` is now `policy.sample_actions(obs)` and requires the current observation as input.
fix
Update calls from `action = policy.sample()` to `action = policy.sample_actions(obs)`.
affects: >=0.4.0
gotchaLeRobot requires Python 3.12+ and PyTorch >= 2.1. Incompatibilities can lead to installation issues or runtime errors.
fix
Ensure your Python environment is `3.12` or newer, and PyTorch is `2.1` or newer. Use `pip install torch` to update PyTorch if needed.
affects: All versions
Upgrade
Version history
0.5.1latest on PyPI · released Apr 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
lerobot — pip install lerobot · libregistry