2025-03-05 17:56:51 +01:00
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
2025-07-17 14:30:20 +02:00
[ build-system ]
requires = [ "setuptools" ]
build-backend = "setuptools.build_meta"
2025-02-16 14:28:03 +01:00
[ project . urls ]
2025-07-17 14:30:20 +02:00
homepage = "https://huggingface.co/lerobot"
documentation = "https://huggingface.co/docs/lerobot/index"
source = "https://github.com/huggingface/lerobot"
2025-02-16 14:28:03 +01:00
issues = "https://github.com/huggingface/lerobot/issues"
discord = "https://discord.gg/s3KuuzsPFb"
[ project ]
2024-02-28 19:11:29 +01:00
name = "lerobot"
2025-07-21 09:16:50 -06:00
version = "0.2.0"
2024-04-16 12:09:56 +02:00
description = "🤗 LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch"
2025-07-17 14:30:20 +02:00
readme = "README.md"
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
2024-02-28 19:11:29 +01:00
authors = [
2025-03-05 17:56:51 +01:00
{ name = "Rémi Cadène" , email = "re.cadene@gmail.com" } ,
{ name = "Simon Alibert" , email = "alibert.sim@gmail.com" } ,
{ name = "Alexander Soare" , email = "alexander.soare159@gmail.com" } ,
{ name = "Quentin Gallouédec" , email = "quentin.gallouedec@ec-lyon.fr" } ,
2025-07-17 14:30:20 +02:00
{ name = "Steven Palma" , email = "imstevenpmwork@ieee.org" } ,
{ name = "Pepijn Kooijmans" , email = "pepijnkooijmans@outlook.com" } ,
{ name = "Michel Aractingi" , email = "michel.aractingi@gmail.com" } ,
2025-03-05 17:56:51 +01:00
{ name = "Adil Zouitine" , email = "adilzouitinegm@gmail.com" } ,
2025-07-17 14:30:20 +02:00
{ name = "Dana Aubakirova" , email = "danaaubakirova17@gmail.com" } ,
{ name = "Caroline Pascal" , email = "caroline8.pascal@gmail.com" } ,
{ name = "Martino Russi" , email = "nopyeps@gmail.com" } ,
2025-03-05 17:56:51 +01:00
{ name = "Thomas Wolf" , email = "thomaswolfcontact@gmail.com" } ,
2024-02-28 19:11:29 +01:00
]
2025-03-05 17:56:51 +01:00
classifiers = [
2024-02-28 19:11:29 +01:00
"Development Status :: 3 - Alpha" ,
"Intended Audience :: Developers" ,
2024-04-16 12:09:56 +02:00
"Intended Audience :: Education" ,
"Intended Audience :: Science/Research" ,
"License :: OSI Approved :: Apache Software License" ,
2024-03-05 16:03:03 +01:00
"Programming Language :: Python :: 3.10" ,
2025-07-17 14:30:20 +02:00
"Topic :: Software Development :: Build Tools" ,
"Topic :: Scientific/Engineering :: Artificial Intelligence" ,
2024-02-28 19:11:29 +01:00
]
2025-07-17 14:30:20 +02:00
keywords = [ "lerobot" , "huggingface" , "robotics" , "machine learning" , "artificial intelligence" ]
2025-02-16 14:28:03 +01:00
dependencies = [
2025-07-17 14:30:20 +02:00
# Hugging Face dependencies
"datasets>=2.19.0,<=3.6.0" , # TODO: Bumb dependency
2025-02-16 14:28:03 +01:00
"diffusers>=0.27.2" ,
2025-07-28 11:09:18 +02:00
"huggingface-hub[hf-transfer,cli]>=0.27.1,<0.34.0" ,
2025-07-17 14:30:20 +02:00
# Core dependencies
"cmake>=3.29.0.1" ,
2025-02-16 14:28:03 +01:00
"einops>=0.8.0" ,
2025-04-09 17:33:01 +02:00
"opencv-python-headless>=4.9.0" ,
2025-04-29 17:39:35 +02:00
"av>=14.2.0" ,
2025-05-28 16:54:20 +02:00
"torch>=2.2.1" ,
"torchcodec>=0.2.1; sys_platform != 'win32' and (sys_platform != 'linux' or (platform_machine != 'aarch64' and platform_machine != 'arm64' and platform_machine != 'armv7l')) and (sys_platform != 'darwin' or platform_machine != 'x86_64')" ,
2025-02-16 14:28:03 +01:00
"torchvision>=0.21.0" ,
2025-07-17 14:30:20 +02:00
"jsonlines>=4.0.0" ,
"packaging>=24.2" ,
"pynput>=1.7.7" ,
"pyserial>=3.5" ,
2025-02-16 14:28:03 +01:00
"wandb>=0.16.3" ,
2025-07-17 14:30:20 +02:00
"draccus==0.10.0" , # TODO: Remove ==
"gymnasium>=0.29.1,<1.0.0" , # TODO: Bumb dependency
"rerun-sdk>=0.21.0,<0.23.0" , # TODO: Bumb dependency
# Support dependencies
"deepdiff>=7.0.1,<9.0.0" ,
"flask>=3.0.3,<4.0.0" ,
"imageio[ffmpeg]>=2.34.0,<3.0.0" ,
"termcolor>=2.4.0,<4.0.0" ,
2025-02-16 14:28:03 +01:00
]
2024-04-23 14:13:25 +02:00
2025-07-17 14:30:20 +02:00
# Optional dependencies
2025-02-16 14:28:03 +01:00
[ project . optional-dependencies ]
2025-07-17 14:30:20 +02:00
# Common
pygame-dep = [ "pygame>=2.5.1" ]
placo-dep = [ "placo>=0.9.6" ]
transformers-dep = [ "transformers>=4.50.3,<4.52.0" ] # TODO: Bumb dependency
2025-07-23 16:30:01 +07:00
grpcio-dep = [ "grpcio==1.73.1" , "protobuf==6.31.0" ]
2025-07-17 14:30:20 +02:00
# Motors
2025-06-05 17:48:43 +02:00
feetech = [ "feetech-servo-sdk>=1.0.0" ]
2025-07-17 14:30:20 +02:00
dynamixel = [ "dynamixel-sdk>=3.7.31" ]
# Robots
gamepad = [ "lerobot[pygame-dep]" , "hidapi>=0.14.0" ]
hopejr = [ "lerobot[feetech]" , "lerobot[pygame-dep]" ]
lekiwi = [ "lerobot[feetech]" , "pyzmq>=26.2.1" ]
kinematics = [ "lerobot[placo-dep]" ]
2025-06-05 17:48:43 +02:00
intelrealsense = [
"pyrealsense2>=2.55.1.6486 ; sys_platform != 'darwin'" ,
"pyrealsense2-macosx>=2.54 ; sys_platform == 'darwin'" ,
]
2025-07-17 18:07:07 +02:00
# stretch = [
# "hello-robot-stretch-body>=0.7.27 ; sys_platform == 'linux'",
# "pyrender @ git+https://github.com/mmatl/pyrender.git ; sys_platform == 'linux'",
# "pyrealsense2>=2.55.1.6486 ; sys_platform != 'darwin'"
# ] # TODO: Currently not supported
2025-07-17 14:30:20 +02:00
# Policies
pi0 = [ "lerobot[transformers-dep]" ]
smolvla = [ "lerobot[transformers-dep]" , "num2words>=0.5.14" , "accelerate>=1.7.0" , "safetensors>=0.4.3" ]
2025-07-23 16:30:01 +07:00
hilserl = [ "lerobot[transformers-dep]" , "gym-hil>=0.1.9" , "lerobot[grpcio-dep]" , "lerobot[placo-dep]" ]
2025-07-17 14:30:20 +02:00
# Features
async = [ "lerobot[grpcio-dep]" , "matplotlib>=3.10.3" ]
# Development
docs = [ "hf-doc-builder @ git+https://github.com/huggingface/doc-builder.git@main" , "watchdog >= 6.0.0" ]
2025-07-23 16:30:01 +07:00
dev = [ "pre-commit>=3.7.0" , "debugpy>=1.8.1" , "lerobot[grpcio-dep]" , "grpcio-tools==1.73.1" ]
2025-07-17 14:30:20 +02:00
test = [ "pytest>=8.1.0" , "pytest-timeout>=2.4.0" , "pytest-cov>=5.0.0" , "mock-serial>=0.0.1 ; sys_platform != 'win32'" ]
2025-02-16 14:28:03 +01:00
video_benchmark = [ "scikit-image>=0.23.2" , "pandas>=2.2.2" ]
2024-02-28 19:11:29 +01:00
2025-07-17 14:30:20 +02:00
# Simulation
aloha = [ "gym-aloha>=0.1.1" ]
pusht = [ "gym-pusht>=0.1.5" , "pymunk>=6.6.0,<7.0.0" ] # TODO: Fix pymunk version in gym-pusht instead
xarm = [ "gym-xarm>=0.1.1" ]
2025-07-17 18:07:07 +02:00
# All
all = [
"lerobot[dynamixel]" ,
"lerobot[gamepad]" ,
"lerobot[hopejr]" ,
"lerobot[lekiwi]" ,
"lerobot[kinematics]" ,
"lerobot[intelrealsense]" ,
"lerobot[pi0]" ,
"lerobot[smolvla]" ,
"lerobot[hilserl]" ,
"lerobot[async]" ,
"lerobot[docs]" ,
"lerobot[dev]" ,
"lerobot[test]" ,
"lerobot[video_benchmark]" ,
"lerobot[aloha]" ,
"lerobot[pusht]" ,
"lerobot[xarm]"
]
2025-07-25 12:06:46 +02:00
[ project . scripts ]
lerobot-calibrate = "lerobot.calibrate:main"
lerobot-find-cameras = "lerobot.find_cameras:main"
lerobot-find-port = "lerobot.find_port:main"
lerobot-record = "lerobot.record:main"
lerobot-replay = "lerobot.replay:main"
lerobot-setup-motors = "lerobot.setup_motors:main"
lerobot-teleoperate = "lerobot.teleoperate:main"
lerobot-eval = "lerobot.scripts.eval:main"
lerobot-train = "lerobot.scripts.train:main"
2025-07-17 14:30:20 +02:00
# ---------------- Tool Configurations ----------------
[ tool . setuptools . packages . find ]
where = [ "src" ]
2024-02-28 19:11:29 +01:00
2024-02-29 12:26:35 +01:00
[ tool . ruff ]
target-version = "py310"
2025-07-17 14:30:20 +02:00
line-length = 110
2025-06-13 13:15:47 +02:00
exclude = [ "tests/artifacts/**/*.safetensors" , "*_pb2.py" , "*_pb2_grpc.py" ]
2024-02-29 12:26:35 +01:00
[ tool . ruff . lint ]
2025-07-17 14:30:20 +02:00
# E, W: pycodestyle errors and warnings
# F: PyFlakes
# I: isort
# UP: pyupgrade
# B: flake8-bugbear (good practices, potential bugs)
# C4: flake8-comprehensions (more concise comprehensions)
# A: flake8-builtins (shadowing builtins)
# SIM: flake8-simplify
# RUF: Ruff-specific rules
# D: pydocstyle (for docstring style/formatting)
# S: flake8-bandit (some security checks, complements Bandit)
# T20: flake8-print (discourage print statements in production code)
# N: pep8-naming
# TODO: Uncomment rules when ready to use
select = [
"E" , "W" , "F" , "I" , "B" , "C4" , "T20" , "N" # "SIM", "A", "S", "D", "RUF", "UP"
]
ignore = [
"E501" , # Line too long
"T201" , # Print statement found
"T203" , # Pprint statement found
"B008" , # Perform function call in argument defaults
]
2024-03-11 12:10:46 +01:00
2025-06-05 17:48:43 +02:00
[ tool . ruff . lint . per-file-ignores ]
"__init__.py" = [ "F401" , "F403" ]
2025-07-17 14:30:20 +02:00
[ tool . ruff . lint . isort ]
combine-as-imports = true
known-first-party = [ "lerobot" ]
[ tool . ruff . lint . pydocstyle ]
convention = "google"
[ tool . ruff . format ]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
2025-03-01 19:19:26 +01:00
[ tool . bandit ]
exclude_dirs = [
"tests" ,
"benchmarks" ,
2025-07-01 16:34:46 +02:00
"src/lerobot/datasets/push_dataset_to_hub" ,
"src/lerobot/datasets/v2/convert_dataset_v1_to_v2" ,
"src/lerobot/policies/pi0/conversion_scripts" ,
"src/lerobot/scripts/push_dataset_to_hub.py" ,
2025-03-01 19:19:26 +01:00
]
2025-07-15 12:28:22 +02:00
skips = [ "B101" , "B311" , "B404" , "B603" , "B615" ]
2024-03-11 12:10:46 +01:00
2025-02-25 23:51:15 +01:00
[ tool . typos ]
default . extend-ignore-re = [
2025-03-05 17:56:51 +01:00
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$" , # spellchecker:disable-line
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on" , # spellchecker:<on|off>
2025-02-25 23:51:15 +01:00
]
default . extend-ignore-identifiers-re = [
# Add individual words here to ignore them
"2nd" ,
"pn" ,
"ser" ,
"ein" ,
]
2025-07-17 14:30:20 +02:00
# TODO: Uncomment when ready to use
# [tool.interrogate]
# ignore-init-module = true
# ignore-init-method = true
# ignore-nested-functions = false
# ignore-magic = false
# ignore-semiprivate = false
# ignore-private = false
# ignore-property-decorators = false
# ignore-module = false
# ignore-setters = false
# fail-under = 80
# output-format = "term-missing"
# color = true
# paths = ["src/lerobot"]
# [tool.mypy]
# python_version = "3.10"
# warn_return_any = true
# warn_unused_configs = true
# ignore_missing_imports = false