mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-06 09:37:06 +00:00
708fa1d189
* Add GR00T N1.7 support
Add GR00T N1.7 policy configuration, checkpoint compatibility, processor parity, LIBERO documentation, and focused tests.
Co-authored-by: Ryan Halabi <ryhalabi@nvidia.com>
* Move Groot processor compatibility into Groot loader
* Restore GR00T Flash Attention install guidance
* Allow Groot fake RTC chunk prefetch
* Fix GR00T N1.7 RTC action decoding
* Trim GR00T N1.7 RTC chunks to valid horizon
* Ignore padded GR00T N1.7 RTC prefix rows
* removed n1.5 dependency
* removed remaining N1.5 traces
* groot: auto-enable LIBERO gripper action transform for libero_sim
GR00T N1.7 emits gripper in [0,1] but LIBERO expects [-1,1]. The decode
transform existed but was never auto-enabled for embodiment_tag=libero_sim,
so the policy scored 0% on LIBERO eval. Auto-set it in __post_init__ (still
overridable). LIBERO Spatial eval: 0% -> 98%.
* Reconnect GR00T relative action processors
* groot: remove dead N1.5 code (eagle2_hg_model, flow_matching_action_head, action_encoder)
N1.7 backbone is nvidia/Cosmos-Reason2-2B via Qwen3VLForConditionalGeneration,
not Eagle2 — eagle2_hg_model/ had zero refs outside its own dir.
GR00TN17ActionHead (groot_n1_7.py) re-implements MultiEmbodimentActionEncoder +
CategorySpecificLinear + swish + SinusoidalPositionalEncoding locally, so
flow_matching_action_head.py (N1.5 FlowmatchingActionHead) and its sole
dependency action_encoder.py are dead. Verified: no src/ or tests/ reference.
Removed (~2037 LOC):
- eagle2_hg_model/ (4 files, ~1575 LOC)
- action_head/flow_matching_action_head.py (408 LOC)
- action_head/action_encoder.py (54 LOC)
cross_attention_dit.py KEPT (DiT/AlternateVLDiT/SelfAttentionTransformer live in N1.7).
* groot: reuse lerobot get_device_from_parameters instead of inline lookup
modeling_groot.py duplicated next(self.parameters()).device twice. LeRobot
ships get_device_from_parameters in policies/utils.py (used by diffusion,
vqbet, tdmpc, gaussian_actor). Reuse it for consistency with the framework.
* groot: fix stale Eagle VLM docstring in processor (N1.7 uses Qwen3-VL backbone)
Addresses checker nit: processor_groot.py docstring still described the N1.5
Eagle VLM path with eagle_content/eagle_* keys that no longer exist in the code.
* test(groot): add N1.7 original-vs-LeRobot output parity test
Verifies the LeRobot GR00T N1.7 integration produces equivalent raw
action_pred to NVIDIA Isaac-GR00T for the same checkpoint, inputs, seed,
precision (fp32) and attention kernel (SDPA): max|diff|=8.9e-7 on the
libero_sim embodiment (GR00T-N1.7-LIBERO/libero_10).
The two impls pin incompatible transformers majors (orig 4.57.3 vs
LeRobot 5.x) and cannot share a process, so the original outputs + exact
collated inputs are produced out-of-process and loaded from an .npz. The
test skips on CI / when the checkpoint or artifact are absent.
* test(groot): parametrize N1.7 parity across all checkpoint embodiments
Generalize the original-vs-LeRobot N1.7 output-parity test from a single
libero_sim case to every embodiment tag in the checkpoint (libero_sim, oxe_droid,
real_g1, the real_r1_pro_sharpa family, and the xdof family). Inputs are built
generically from checkpoint metadata; the test discovers per-tag .npz artifacts
and runs one parametrized case each, loading the LeRobot model once via a fixture.
All 9 embodiments match the original to fp32 epsilon (max|diff| < 3e-6), confirming
the integration is correct across the model's full embodiment space and not overfit
to libero_sim.
* test(groot): self-contained parity test + in-repo producer + docs
- Rename test_groot_n1_7_vs_original.py -> test_groot_vs_original.py
- Make the test self-contained: producer script (dump_original_n1_7.py) now lives
next to the test; default artifact dir is repo-relative
(tests/policies/groot/artifacts/), overridable via GROOT_N1_7_PARITY_DIR. The
test only reads artifacts and skips if absent -- it never creates external dirs.
- Heavy .npz artifacts (~6-9MB each) are gitignored and regenerated by the producer;
never committed.
- Drop the verbose 'MULTIPLE EMBODIMENTS' docstring block (kept a one-line note).
- Document the parity procedure in the groot policy README (docs/source/policy_groot_README.md).
- Rename test fn test_groot_n1_7_get_action_parity -> test_groot_get_action_parity.
9/9 embodiments still pass (max|diff| < 3e-6, fp32 eps).
* docs(groot): drop WHY TWO ENVIRONMENTS block from parity test docstring
* test(groot): move parity producer into utils/ package
Mirror the tests/policies/pi0_pi05/utils convention: move dump_original_n1_7.py into
a tests/policies/groot/utils/ package (with __init__.py) and update all path
references in the test docstring/skip-message and the policy README.
* test(groot): adopt test_groot_lerobot for GR00T N1.7, drop N1.5
The test loaded MODEL_PATH='aractingi/bimanual-handover-groot-10k', an N1.5
checkpoint (config base_model_path=nvidia/GR00T-N1.5-3B, no model_version). On
load, model_version defaults to n1.7 while the base path infers n1.5, so the
version-consistency guard in GrootConfig.__post_init__ raised ValueError and both
test_lerobot_groot_inference and test_lerobot_groot_forward_pass failed. N1.5 is no
longer a supported model_version.
Adopt the test for N1.7:
- MODEL_PATH -> nvidia/GR00T-N1.7-3B (root-level sharded safetensors; loads via
GrootPolicy.from_pretrained as a base N1.7 model).
- Embodiment tag 'gr1' (N1.5) -> 'gr1_unified' (valid N1.7 tag from the checkpoint
embodiment_id.json), via a single EMBODIMENT_TAG constant.
- DUMMY_ACTION_HORIZON 16 -> 40 to match N1.7's native action-chunk size.
- Docstrings/labels updated to 'GR00T N1.7'.
Both tests run and pass on CUDA; full tests/policies/groot/ suite is
73 passed / 0 failed / 0 skipped.
* docs(groot): document the N1.5 removal and the N1.7 parity test
- groot.mdx: breaking-change warning and migration path (pin lerobot==0.5.1 to
keep N1.5, or move to N1.7); the dead `huggingface-cli download` is replaced
with `hf download`.
- policy_groot_README.md: N1.5 removal note, updated paper / model-card links,
and the two-comparison (model parity + preprocessor parity) description of
the original-vs-LeRobot test, including the raw-observation artifacts and
recorded seed.
* fix(groot): N1.7 backbone loading and DiT parameter-count logging
- select_layer default tracks the N1.7-3B checkpoint value (16); real
checkpoint loads still override it from config.json.
- get_backbone_cls recognizes Cosmos-Reason2 / Qwen3-VL backbones by name and
warns (instead of silently assuming) when an unrecognized backbone is loaded
only on the strength of backbone_model_type='qwen'.
- 'revision' pins the GR00T checkpoint repo only and is no longer forwarded
into the unrelated backbone repo load; pin the backbone via
transformers_loading_kwargs instead.
- DiT / SelfAttentionTransformer parameter counts go through logging.debug
instead of print().
* fix(groot): N1.7 config defaults, N1.5 rejection, and processor/model runtime fixes
Covers the GR00T N1.7 source trio (configuration, processor, model wrapper).
Config:
- GrootConfig defaults are the N1.7 values; explicitly passed legacy N1.5-era
values (chunk_size=50, max_state_dim=64, ...) are remapped with a warning
instead of silently.
- action_decode_transform gains an 'auto' sentinel so an explicit 'none'
opt-out wins over the libero_sim default and survives save/load round-trips.
- action_delta_indices is cached on the inputs that determine it.
- Legacy N1.5 checkpoints/configs (tokenizer_assets_repo, model_type/
architectures/eagle backbone markers) are rejected with a single clear
error pointing to lerobot==0.5.1.
Processor:
- GrootN17ActionDecodeStep handles the 2-D (B, D) actions delivered by sync
select_action (relative eef/non-eef decode in eval/record flows).
- Postprocessor falls back to dataset stats when a raw checkpoint lacks the
configured embodiment tag; raw-state cache is per-instance, not
process-global; caller overrides (device, rename_map) are honored on the
raw-checkpoint branch.
- Camera/modality-key mismatches warn (including the zero-match fallback);
deprecated Qwen2VLImageProcessorFast replaced with Qwen2VLImageProcessor;
removed N1.5 processor steps are stubbed to raise the removal guidance and
the action-unpack step is re-registered as _v2.
Model:
- Flash-attention probe is diagnostic-only; forward raises on a missing loss;
print() replaced with logging; N1.5 base-path mismatch includes the
removal guidance.
* fix(groot): skip normalization overrides for training
* fix(groot): GPU/tensor N1.7 image preprocessing + resize to trained resolution
GR00T training was dataloader-bound (0->100->0 GPU-utilization sawtooth).
GrootN17VLMEncodeStep ran the Qwen3-VL image processor per frame on PIL images
on the single CPU main-loop thread, and that cost is timed inside dataloading_s
(preprocessor(batch) runs in the main process, not the dataloader workers), so
adding workers cannot hide it.
- Feed the torchvision-backed Qwen3-VL processor (C,H,W) uint8 tensors instead
of a per-frame Image.fromarray PIL roundtrip, and run resize/normalize/patchify
on config.device (GPU) when available. Bit-identical on CPU when no resize is
configured; with a resize only the PIL->torchvision bicubic backend differs
(<2/255 per pixel). The use_albumentations path stays PIL/cv2; reload on a box
without the saved device falls back to CPU.
- Default image_target_size/crop to the N1.7 backbone's training geometry
(256x256 / 230x230) when a checkpoint ships no image sizing (checkpoint_assets
is None, e.g. finetuning nvidia/GR00T-N1.7-3B via repo-id with a new
embodiment). Previously image_target_size=None disabled the resize, so
full-resolution frames were patchified into ~4.7x more vision tokens than the
model was trained on -- inflating dataloading_s (patchify) and update_s (VLM
sequence) and skewing the input distribution. Checkpoints that pin their own
sizing are honored; the default constants are shared with GR00T_N1_7_DEFAULTS.
Net: preprocessing leaves the CPU critical path and the VLM sees the resolution
it was trained on -- faster training/inference and a correct train/serve
distribution. Affects inference too (shared preprocessor); existing checkpoints
still load (backward compatible) but must be retrained to gain the benefits.
* refactor(groot): N1.7 style cleanup (utils, imports, flash-attn, config)
Mechanical refactor of the GR00T N1.7 policy to match the repo's architecture and
style standards. No change to policy algorithm/numerics; only UX/CLI and packaging
changes. Tests are intentionally left untouched (out of scope) and need updating
for the removed `model_version` field.
Cleanup & consolidation:
- Add `groot/utils.py` holding the pure, side-effect-free helpers (JSON I/O, value
coercion, stat flattening, rot6d/SE3 math, language/batch prep) shared by the
config and processor layers.
- Remove dead code: the unused `resolve_groot_n1_7_backbone_model` cache-resolver
cluster, `GR00TN17Config.to_filtered_dict/json`, and the `_copy_default` wrapper.
Imports & execution guards:
- Hoist nested imports to module top; relative imports within the package, absolute
for external modules. The version-gated Qwen3-VL classes import under the single
`_transformers_available` guard (transformers is pinned >=5.4, which ships them).
- No import-time side effects: `_register_with_transformers()` now runs in
`GR00TN17.__init__` (idempotent via `register(exist_ok=True)`), and the N1.5 step
stubs register lazily before pipeline deserialization (idempotent via the
registry, no run-once globals).
- Gate optional deps at the point of use with `require_package(..., extra="groot")`.
Dependencies & docs:
- Drop `flash-attn` (and its build-only dep `ninja`) from the `groot` extra; default
to SDPA (numerically equivalent) with opt-in via `--policy.use_flash_attention`.
Un-comment `lerobot[groot]` in the `all` extra and regenerate `uv.lock`.
- Rewrite the `groot.mdx` install section: flash-attn is a purely optional,
user-managed optimization that LeRobot neither installs nor requires.
Config & CLI:
- Surface previously-frozen knobs on `GrootConfig` (plumbed into `GR00TN17Config`;
no-ops at their defaults): inference — `num_inference_timesteps`, `rtc_ramp_rate`,
`use_flash_attention`; fine-tuning — `tune_top_llm_layers` (partial-LLM tuning)
and `tune_vlln` (previously hardwired to True).
- Convert the single-valued `model_version` and `n1_7_backbone_model` fields to
internal constants.
- Keep `base_model_path`: it is NOT equivalent to `pretrained_path` (raw NVIDIA
checkpoints have no LeRobot `type` field and load only via `base_model_path`) and
is genuinely user-tunable.
- Keep the deprecated Isaac-GR00T/N1.5 fields (and the dead LoRA fields) as a
back-compat block so a v0.5.1 N1.5 `config.json` still parses under draccus and is
rejected with the friendly N1.5 removal message instead of an opaque decode error.
* Optimize GR00T N1.7 image preprocessing
* Remove PIL fallback from GR00T preprocessing
* Fix GROOT relative action training stats
* Address GROOT relative action review feedback
* Fix GROOT N1.7 relative action stats
* Fix GROOT relative action training stats
* Fix GROOT relative action padding and RTC leftovers
* Reset rollout state after robot episode end
* Revert "Reset rollout state after robot episode end"
This reverts commit 1322f45aec.
* Move GROOT relative stats out of train script
* Guard GR00T relative action stepwise decode
* Match GR00T N1.7 OSS preprocessing and relative actions
* Apply LIBERO action decode override after loading
* Format GR00T OSS parity changes
* chore(policies): add guards, warnings and comments + recover tests n1.5 check
* fix(style): pre-commit
* fix(ci): guard dependecy checks
* chore(groot): move cv2 to the top as its in the default install tag
* chore(policies): add explicit dataset dependecy to gr00t implementation
* fix(test): add guard
* fix(groot): make N1.7 letterbox opt-in
* feat(groot): activate checkpoint-configured N1.7 raw-state dropout during training
Isaac-GR00T applies dual state regularization during fine-tuning: raw-state
zeroing driven by the processor sidecar's state_dropout_prob (0.2 for the
inspected N1.7 checkpoint) plus encoded-feature dropout. Baseline LeRobot kept
the processor in deterministic mode, so the raw-state dropout never activated
(RCA Tier-2 contributor to the LeRobot-trained SO-101 failures).
- GrootN17PackInputsStep: runtime-only 'training' flag + state_dropout_prob;
whole-sample state zeroing gated on torch.is_grad_enabled() so eval and
no_grad validation paths are unaffected
- sidecar loader reads state_dropout_prob from processor_config.json
- state_dropout_prob serializes with the step; the training flag intentionally
does not (reloaded pipelines default to eval, re-enabled only when processors
are rebuilt with dataset_meta)
- _set_groot_preprocessor_training toggles any dataclass step exposing a
'training' field on serialized-pipeline reloads
Verification: tests/policies/groot/test_groot_state_dropout.py (4 passed) on
RTX PRO 6000 / CUDA 13.3.
* fix(groot): align N1.7 fine-tuning optimizer/scheduler/precision with Isaac-GR00T
Evidence from the LeRobot-vs-OSS checkpoint comparison: the LeRobot/HF 8k
checkpoint's DiT moved only ~19% as far from base as the OSS-trained one
(0.0547 vs 0.285 relative L2) - undertrained because the scheduler decayed over
a hardcoded 10k steps regardless of --steps, on top of beta1/clip mismatches.
- AdamW betas (0.95, 0.999) -> (0.9, 0.999) and grad_clip_norm 10.0 -> 1.0
(Isaac defaults)
- scheduler: hardcoded CosineDecayWithWarmup(10k decay, floor 10% peak) ->
DiffuserSchedulerConfig HF cosine with ceil(max_steps * warmup_ratio) warmup,
deriving num_training_steps from the outer --steps at runtime
- model_params_fp32 (default true): keep master weights in FP32 and compute
under BF16 autocast like the native N1.7 recipe (fixes optimizer-update
numerics vs pure-BF16 params)
- weight-decay grouping via transformers get_parameter_names: biases and norm
parameters excluded from decay
- restore the TF4 lm_head/embedding weight tie so the unused Qwen LM head stays
frozen and deduplicated in checkpoints
- action_mask kept in native dtype for the masked flow-matching loss
- drop_n_last_frames: exclude episode tails that cannot supply a complete
action chunk (Isaac sampler behavior)
Verification: tests/policies/groot/test_groot_training_optim_contract.py
(7 passed) + remaining groot suite 11 passed/5 skipped on RTX PRO 6000 /
CUDA 13.3. Note: tests/policies/groot/test_groot_n1_7.py does not collect on
the base branch (pre-existing ImportError, fixed in PR #37).
* feat(groot): train-time random crop for N1.7 (eval keeps center crop)
Isaac-GR00T crops a random crop_fraction window during training and the
deterministic center window at eval, replaying the sampled window across all
camera views of a sample. This contract is unchanged since the N1.5 release
(gr00t/data/transform/video.py: "If mode is 'train', return a random crop
transform. If mode is 'eval', return a center crop transform.") and mirrors
LeRobot's own Diffusion/VQBeT crop_is_random pattern. The LeRobot N1.7 port
used the eval center crop for training too, so the fine-tuned projector/DiT
never sees frame borders and trains on a single fixed appearance point.
Scope: crop geometry ONLY - no color jitter, no new dependencies. The random
window is plain numpy slicing inside the existing cv2 eval transform:
- _transform_n1_7_image_for_vlm_albumentations gains crop_position=(y, x)
fractions; None keeps the center crop byte-identical to before (verified
by test)
- GrootN17VLMEncodeStep gains a runtime-only 'training' flag (never
serialized; reloaded pipelines default to eval); training samples ONE
window per sample and reuses it across (timestep, view) frames - Isaac's
cross-view consistency
- gated on torch.is_grad_enabled() so no_grad validation and frozen-eval
paths are unaffected
- wired via dataset_meta is not None in make_groot_pre_post_processors and
the existing _set_groot_preprocessor_training on serialized reloads
Verification: tests/policies/groot/test_groot_train_random_crop.py (8 passed:
center-crop bit-exactness with crop_position=None, corner/center windows,
cross-view replay, train!=eval, no_grad gating, seed reproducibility,
serialization contract) + groot suite 23 passed / 5 skipped on RTX PRO 6000 /
CUDA 13.3.
* docs(groot): update Training & hardware Evaluation commands
Replace the multi-GPU accelerate-launch Training snippet with the current
single-command 'uv run lerobot-train' N1.7 recipe (relative actions excluding
gripper, bf16, flash attention, chunk/n_action_steps=16, bs64/20k steps).
Replace the bimanual 'Evaluate in your hardware setup' rollout example with the
SO-101 follower RTC 'uv run lerobot-rollout' command (strategy.type=base,
inference.type=rtc, wrist+front cameras, place-the-vial task).
Docs-only; no source/test changes.
* docs(groot): parameterize commands with env vars + fill LIBERO results
- Introduce BASE_MODEL / DATASET_ID / REPO_ID / JOB_NAME / OUTPUT_DIR env vars
in the training command and reuse OUTPUT_DIR + BASE_MODEL in the rollout cmd.
- Fill the LIBERO benchmark table with GR00T-LeRobot success rates
(Spatial 94%, Object 98%, Goal 93%, LIBERO 10/Long 90%; avg 93.75%),
drop the OSS column and XX placeholders. LeRobot-focused.
* docs(groot): drop export block, reference env vars directly
Use $DATASET_ID / $BASE_MODEL / $REPO_ID / $OUTPUT_DIR / $JOB_NAME as
bare placeholders in the commands without concrete export assignments.
* docs(groot): keep BASE_MODEL export in training command
* docs(groot): use literal HF repo IDs for dataset/policy repo_id
Public-facing Hub references (--dataset.repo_id, --policy.repo_id) shown as
concrete IDs; local-only values ($OUTPUT_DIR, $JOB_NAME) stay as placeholders.
* docs(groot): add LIBERO training command example
* docs(groot): remove LIBERO checkpoints subdirectory section
* docs(groot): use $BASE_MODEL for base_model_path in LIBERO eval
* docs(groot): drop hf download step from LIBERO eval, fix intro
* docs(groot): restore suite checkpoint download intro sentence
* docs(groot): remove checkpoint download note above LIBERO eval
* docs(groot): update training and rollout commands with new parameters and dependencies
* Add sample so101 training command
* Remove sample so101 training command
* docs(groot): remove optional Flash Attention setup instructions and update base model path for evaluation
* docs(groot): update training command with image transformation parameters
* docs(groot): add note on inference.queue_threshold value for stable inference
* chore(style): pre-commit gr00t
* docs(groot): update
* chore(policies): minor details
* fix(groot): license headers + test guards
* chore(policies): fix tests
* docs(groot): relative actions param doc
* chore(policy): address some of the AI review items
---------
Co-authored-by: Andrew Wrenn <awrenn@nvidia.com>
Co-authored-by: Ryan Halabi <ryhalabi@nvidia.com>
Co-authored-by: nv-sachdevkartik <ksachdev@nvidia.com>
Co-authored-by: groot-validation <groot-validation@localhost>
Co-authored-by: johnnynunez <johnnynuca14@gmail.com>
Co-authored-by: lbenhorin <lbenhorin@nvidia.com>
562 lines
21 KiB
TOML
562 lines
21 KiB
TOML
# 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.
|
|
|
|
[build-system]
|
|
requires = ["setuptools"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project.urls]
|
|
homepage = "https://huggingface.co/lerobot"
|
|
documentation = "https://huggingface.co/docs/lerobot/index"
|
|
source = "https://github.com/huggingface/lerobot"
|
|
issues = "https://github.com/huggingface/lerobot/issues"
|
|
discord = "https://discord.gg/s3KuuzsPFb"
|
|
|
|
[project]
|
|
name = "lerobot"
|
|
version = "0.5.2"
|
|
description = "🤗 LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch"
|
|
dynamic = ["readme"]
|
|
license = { text = "Apache-2.0" }
|
|
requires-python = ">=3.12"
|
|
authors = [
|
|
{ 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" },
|
|
{ name = "Steven Palma", email = "imstevenpmwork@ieee.org" },
|
|
{ name = "Pepijn Kooijmans", email = "pepijnkooijmans@outlook.com"},
|
|
{ name = "Michel Aractingi", email = "michel.aractingi@gmail.com"},
|
|
{ name = "Adil Zouitine", email = "adilzouitinegm@gmail.com" },
|
|
{ name = "Dana Aubakirova", email = "danaaubakirova17@gmail.com"},
|
|
{ name = "Caroline Pascal", email = "caroline8.pascal@gmail.com"},
|
|
{ name = "Martino Russi", email = "nopyeps@gmail.com"},
|
|
{ name = "Thomas Wolf", email = "thomaswolfcontact@gmail.com" },
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: Education",
|
|
"Intended Audience :: Science/Research",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Topic :: Software Development :: Build Tools",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
]
|
|
keywords = ["lerobot", "huggingface", "robotics", "machine learning", "artificial intelligence"]
|
|
|
|
dependencies = [
|
|
# Core ML
|
|
"torch>=2.7,<2.12.0",
|
|
"torchvision>=0.22.0,<0.27.0",
|
|
"numpy>=2.0.0,<2.3.0", # NOTE: Explicitly listing numpy helps the resolver converge faster. Upper bound imposed by opencv-python-headless.
|
|
"opencv-python-headless>=4.9.0,<4.14.0",
|
|
"Pillow>=10.0.0,<13.0.0",
|
|
"einops>=0.8.0,<0.9.0",
|
|
|
|
# Config & Hub
|
|
"draccus==0.10.0", # TODO: Relax version constraint
|
|
"huggingface-hub>=1.0.0,<2.0.0",
|
|
"requests>=2.32.0,<3.0.0",
|
|
|
|
# Environments
|
|
# NOTE: gymnasium is used in lerobot.envs (lerobot-train, lerobot-eval), policies/factory,
|
|
# and robots/unitree. Moving it to an optional extra would require import guards across many
|
|
# tightly-coupled modules. Candidate for a future refactor to decouple envs from the core.
|
|
"gymnasium>=1.1.1,<2.0.0",
|
|
|
|
# Serialization & checkpointing
|
|
"safetensors>=0.4.3,<1.0.0",
|
|
|
|
# Lightweight utilities
|
|
"packaging>=24.2,<26.0",
|
|
"termcolor>=2.4.0,<4.0.0",
|
|
"tqdm>=4.66.0,<5.0.0",
|
|
|
|
# Build tools (required by opencv-python-headless on some platforms)
|
|
"cmake>=3.29.0.1,<4.2.0",
|
|
"setuptools>=71.0.0,<81.0.0",
|
|
]
|
|
|
|
# Optional dependencies
|
|
[project.optional-dependencies]
|
|
|
|
# ── Feature-scoped extras ──────────────────────────────────
|
|
dataset = [
|
|
"datasets>=4.7.0,<5.0.0",
|
|
"pandas>=2.0.0,<3.0.0", # NOTE: Transitive dependency of datasets
|
|
"pyarrow>=21.0.0,<30.0.0", # NOTE: Transitive dependency of datasets
|
|
"lerobot[av-dep]",
|
|
|
|
# NOTE: torchcodec wheel availability matrix (PyPI):
|
|
# - linux x86_64/amd64 + macOS arm64 : wheels since 0.3.0 (the historic supported set).
|
|
# - win32 x86_64 : wheels since 0.7.0 (needs torch>=2.8).
|
|
# - linux aarch64/arm64 : wheels since 0.11.0 (needs torch>=2.11).
|
|
# - macOS x86_64 (Intel) and linux armv7l: no wheels in any released version -> fall through to the PyAV decoder.
|
|
# Each platform gets its own line so the resolver picks the minimum version that has a wheel for it.
|
|
|
|
# Other torch/torchcodec pairings (informational): 0.8.1 = ffmpeg>=8 support, 0.10 = system-wide ffmpeg support, 0.12 needs torch==2.12.
|
|
"torchcodec>=0.3.0,<0.12.0; (sys_platform == 'linux' and (platform_machine == 'x86_64' or platform_machine == 'AMD64')) or (sys_platform == 'darwin' and platform_machine == 'arm64')",
|
|
"torchcodec>=0.7.0,<0.12.0; sys_platform == 'win32'",
|
|
"torchcodec>=0.11.0,<0.12.0; sys_platform == 'linux' and (platform_machine == 'aarch64' or platform_machine == 'arm64')",
|
|
"jsonlines>=4.0.0,<5.0.0",
|
|
]
|
|
training = [
|
|
"lerobot[dataset]",
|
|
"wandb>=0.24.0,<0.28.0",
|
|
"lerobot[accelerate-dep]",
|
|
]
|
|
hardware = [
|
|
"lerobot[pynput-dep]",
|
|
"lerobot[pyserial-dep]",
|
|
"lerobot[deepdiff-dep]",
|
|
]
|
|
viz = [
|
|
"rerun-sdk>=0.24.0,<0.34.0",
|
|
"foxglove-sdk>=0.25.1,<0.26.0",
|
|
]
|
|
# ── User-facing composite extras (map to CLI scripts) ─────
|
|
# lerobot-record, lerobot-replay, lerobot-calibrate, lerobot-teleoperate, etc.
|
|
core_scripts = ["lerobot[dataset]", "lerobot[hardware]", "lerobot[viz]"]
|
|
# lerobot-eval -- base evaluation framework. You also need the policy's extra (e.g., lerobot[pi])
|
|
# and the environment's extra (e.g., lerobot[pusht]) if evaluating in simulation.
|
|
evaluation = ["lerobot[av-dep]"]
|
|
# lerobot-dataset-viz, lerobot-imgtransform-viz
|
|
dataset_viz = ["lerobot[dataset]", "lerobot[viz]"]
|
|
|
|
# Common
|
|
av-dep = ["av>=15.0.0,<16.0.0"]
|
|
pygame-dep = ["pygame>=2.5.1,<2.7.0"]
|
|
# NOTE: 0.9.16 links against liburdfdom_sensor.so.4, which is unavailable on Ubuntu 24.04
|
|
# (noble ships urdfdom 3.x). Cap below 0.9.16 until system urdfdom 4.x is broadly available.
|
|
#
|
|
# NOTE: placo pulls in pin (Pinocchio), whose binary wheels dlopen specific cmeel sonames
|
|
# (liburdfdom_sensor.so.4.0, libtinyxml2.so.10) but declare only `>=` floors on their cmeel
|
|
# packages. The 2026-05-21 major bumps (cmeel-urdfdom 6.0.0 -> .so.6, cmeel-tinyxml2 11.0.0
|
|
# -> .so.11) ship newer sonames, so left unpinned the resolver grabs them and `import placo`
|
|
# fails at load with "liburdfdom_sensor.so.4.0: cannot open shared object file" (see #3755).
|
|
# There is no cmeel-urdfdom 5.x; <5 selects the 4.x ABI the placo/pin wheels are built against.
|
|
placo-dep = ["placo>=0.9.6,<0.9.16", "cmeel-urdfdom>=4,<5", "cmeel-tinyxml2<11"]
|
|
transformers-dep = ["transformers>=5.4.0,<5.6.0"]
|
|
grpcio-dep = ["grpcio>=1.73.1,<2.0.0", "protobuf>=6.31.1,<8.0.0"]
|
|
accelerate-dep = ["accelerate>=1.14.0,<2.0.0"]
|
|
can-dep = ["python-can>=4.2.0,<5.0.0"]
|
|
peft-dep = ["peft>=0.18.0,<1.0.0"]
|
|
scipy-dep = ["scipy>=1.14.0,<2.0.0"]
|
|
diffusers-dep = ["diffusers>=0.27.2,<0.36.0"]
|
|
qwen-vl-utils-dep = ["qwen-vl-utils>=0.0.11,<0.1.0"]
|
|
matplotlib-dep = ["matplotlib>=3.10.3,<4.0.0", "contourpy>=1.3.0,<2.0.0"] # NOTE: Explicitly listing contourpy helps the resolver converge faster.
|
|
pyserial-dep = ["pyserial>=3.5,<4.0"]
|
|
deepdiff-dep = ["deepdiff>=7.0.1,<9.0.0"]
|
|
pynput-dep = ["pynput>=1.7.8,<1.9.0"]
|
|
pyzmq-dep = ["pyzmq>=26.2.1,<28.0.0"]
|
|
motorbridge-dep = ["motorbridge>=0.3.2,<0.4.0"]
|
|
motorbridge-smart-servo-dep = ["motorbridge-smart-servo>=0.0.4,<0.1.0"]
|
|
|
|
# Motors
|
|
feetech = ["feetech-servo-sdk>=1.0.0,<2.0.0", "lerobot[pyserial-dep]", "lerobot[deepdiff-dep]"]
|
|
dynamixel = ["dynamixel-sdk>=3.7.31,<3.9.0", "lerobot[pyserial-dep]", "lerobot[deepdiff-dep]"]
|
|
damiao = ["lerobot[can-dep]"]
|
|
robstride = ["lerobot[can-dep]"]
|
|
|
|
# Robots
|
|
openarms = ["lerobot[damiao]"]
|
|
gamepad = ["lerobot[pygame-dep]", "hidapi>=0.14.0,<0.15.0"]
|
|
hopejr = ["lerobot[feetech]", "lerobot[pygame-dep]"]
|
|
lekiwi = ["lerobot[feetech]", "lerobot[pyzmq-dep]"]
|
|
unitree_g1 = [
|
|
# "unitree-sdk2==1.0.1",
|
|
"lerobot[pyzmq-dep]",
|
|
"lerobot[pyserial-dep]",
|
|
"onnxruntime>=1.16.0,<2.0.0",
|
|
"onnx>=1.16.0,<2.0.0",
|
|
"meshcat>=0.3.0,<0.4.0",
|
|
"lerobot[matplotlib-dep]",
|
|
"lerobot[pygame-dep]",
|
|
]
|
|
# reachy2-sdk caps grpcio<=1.73.1 and protobuf<=6.32.0; quarantined here so downstream users aren't held back. reachy2-sdk is unlikely to release new versions.
|
|
reachy2 = [
|
|
"reachy2_sdk>=1.0.15,<1.1.0",
|
|
"grpcio<=1.73.1",
|
|
"protobuf<=6.32.0",
|
|
]
|
|
# Seeed Studio reBot B601-DM follower (motorbridge / CAN) + StarArm102 / reBot Arm 102
|
|
# leader (motorbridge-smart-servo / FashionStar UART servos).
|
|
rebot = ["lerobot[motorbridge-dep]", "lerobot[motorbridge-smart-servo-dep]"]
|
|
kinematics = ["lerobot[placo-dep]"]
|
|
intelrealsense = [
|
|
"pyrealsense2>=2.55.1.6486,<2.57.0 ; sys_platform != 'darwin'",
|
|
"pyrealsense2-macosx>=2.54,<2.57.0 ; sys_platform == 'darwin'",
|
|
]
|
|
phone = ["hebi-py>=2.8.0,<2.12.0", "teleop>=0.1.0,<0.2.0", "fastapi<1.0", "lerobot[scipy-dep]"]
|
|
|
|
# Policies
|
|
diffusion = ["lerobot[diffusers-dep]"]
|
|
wallx = [
|
|
"lerobot[transformers-dep]",
|
|
"lerobot[peft-dep]",
|
|
"lerobot[scipy-dep]",
|
|
"torchdiffeq>=0.2.4,<0.3.0",
|
|
"lerobot[qwen-vl-utils-dep]",
|
|
]
|
|
pi = ["lerobot[transformers-dep]", "lerobot[scipy-dep]"]
|
|
molmoact2 = ["lerobot[transformers-dep]", "lerobot[peft-dep]", "lerobot[scipy-dep]"]
|
|
smolvla = ["lerobot[transformers-dep]", "num2words>=0.5.14,<0.6.0", "lerobot[accelerate-dep]"]
|
|
multi_task_dit = ["lerobot[transformers-dep]", "lerobot[diffusers-dep]"]
|
|
groot = [
|
|
"lerobot[transformers-dep]",
|
|
"lerobot[peft-dep]",
|
|
"lerobot[diffusers-dep]",
|
|
"lerobot[dataset]", # NOTE: processor_groot builds a LeRobotDataset for relative-action training stats
|
|
"dm-tree>=0.1.8,<1.0.0",
|
|
"timm>=1.0.0,<1.1.0",
|
|
"decord>=0.6.0,<1.0.0; (platform_machine == 'AMD64' or platform_machine == 'x86_64')",
|
|
]
|
|
sarm = ["lerobot[transformers-dep]", "pydantic>=2.0.0,<3.0.0", "faker>=33.0.0,<35.0.0", "lerobot[matplotlib-dep]", "lerobot[qwen-vl-utils-dep]"]
|
|
robometer = ["lerobot[transformers-dep]", "lerobot[qwen-vl-utils-dep]", "lerobot[peft-dep]"]
|
|
topreward = ["lerobot[transformers-dep]"]
|
|
xvla = ["lerobot[transformers-dep]"]
|
|
eo1 = ["lerobot[transformers-dep]", "lerobot[qwen-vl-utils-dep]"]
|
|
fastwam = [
|
|
"lerobot[transformers-dep]",
|
|
"lerobot[diffusers-dep]",
|
|
]
|
|
hilserl = ["lerobot[transformers-dep]", "lerobot[dataset]", "gym-hil>=0.1.14,<0.2.0", "lerobot[grpcio-dep]", "lerobot[placo-dep]"]
|
|
vla_jepa = ["lerobot[transformers-dep]", "lerobot[diffusers-dep]", "lerobot[qwen-vl-utils-dep]"]
|
|
lingbot_va = ["lerobot[transformers-dep]", "lerobot[diffusers-dep]", "lerobot[accelerate-dep]"]
|
|
|
|
# Features
|
|
async = ["lerobot[grpcio-dep]", "lerobot[matplotlib-dep]"]
|
|
peft = ["lerobot[transformers-dep]", "lerobot[peft-dep]"]
|
|
|
|
# Annotation pipeline (lerobot-annotate). The only backend is ``openai``,
|
|
# which talks to any OpenAI-compatible server (``vllm serve`` /
|
|
# ``transformers serve`` / hosted). Distributed runs use Hugging Face Jobs
|
|
# (see examples/annotations/run_hf_job.py).
|
|
annotations = [
|
|
"lerobot[dataset]",
|
|
"lerobot[transformers-dep]",
|
|
"openai>=1.40,<2.0",
|
|
# ``vllm`` is intentionally NOT a hard dep: it pins an older torch, and
|
|
# uv's single unified lock would then cap ``torch`` for every extra
|
|
# (e.g. forcing 2.8 while ``torchcodec`` in [dataset] needs 2.11 -> ABI
|
|
# break in CI). The HF Jobs image (``vllm/vllm-openai``) provides vLLM;
|
|
# install it locally only if you run your own ``vllm serve``.
|
|
]
|
|
|
|
# Development
|
|
dev = ["pre-commit>=3.7.0,<5.0.0", "debugpy>=1.8.1,<1.9.0", "lerobot[grpcio-dep]", "grpcio-tools>=1.73.1,<2.0.0", "mypy>=1.19.1", "ruff>=0.14.1", "lerobot[notebook]"]
|
|
notebook = ["jupyter>=1.0.0,<2.0.0", "ipykernel>=6.0.0,<7.0.0"]
|
|
test = ["pytest>=8.1.0,<9.0.0", "pytest-timeout>=2.4.0,<3.0.0", "pytest-cov>=5.0.0,<8.0.0", "mock-serial>=0.0.1,<0.1.0 ; sys_platform != 'win32'"]
|
|
video_benchmark = ["scikit-image>=0.23.2,<0.26.0", "pandas>=2.2.2,<2.4.0"]
|
|
|
|
# Simulation
|
|
# NOTE: Explicitly listing scipy helps flatten the dependecy tree.
|
|
aloha = ["lerobot[dataset]", "gym-aloha>=0.1.4,<0.2.0", "lerobot[scipy-dep]"]
|
|
pusht = ["lerobot[dataset]", "gym-pusht>=0.1.5,<0.2.0", "pymunk>=6.6.0,<7.0.0"] # TODO: Fix pymunk version in gym-pusht instead
|
|
libero = ["lerobot[dataset]", "lerobot[transformers-dep]", "hf-libero>=0.1.4,<0.2.0; sys_platform == 'linux'", "lerobot[scipy-dep]"]
|
|
metaworld = ["lerobot[dataset]", "metaworld==3.0.0", "lerobot[scipy-dep]"]
|
|
# NOTE: vlabench is NOT exposed as a `lerobot` extra. Its only distribution
|
|
# is the OpenMOSS/VLABench GitHub repo (package name `VLABench`, no PyPI
|
|
# release), so any `vlabench>=X` pip spec is unresolvable. Install it
|
|
# manually alongside MuJoCo / dm-control — see docs/source/vlabench.mdx
|
|
# for the recipe.
|
|
# NOTE: robomme is NOT a pyproject extra — mani-skill hard-pins numpy<2
|
|
# which conflicts with lerobot's numpy>=2 base pin, so the two trees can't
|
|
# resolve into a single env. Install it only in the RoboMME Docker image
|
|
# via `uv pip install --override` (see docker/Dockerfile.benchmark.robomme).
|
|
# NOTE: robocasa is NOT exposed as a `lerobot` extra. Its setup.py pins
|
|
# `lerobot==0.3.3` in install_requires, which cyclically shadows our own
|
|
# workspace `lerobot` and makes the graph unsolvable under any resolver
|
|
# (uv, pip). Install it manually alongside robosuite — see
|
|
# docs/source/robocasa.mdx for the recipe.
|
|
|
|
# All
|
|
all = [
|
|
# Feature-scoped extras
|
|
"lerobot[dataset]",
|
|
"lerobot[training]",
|
|
"lerobot[hardware]",
|
|
"lerobot[viz]",
|
|
# NOTE(resolver hint): scipy is pulled in transitively via lerobot[scipy-dep] through
|
|
# multiple extras (aloha, metaworld, pi, wallx, phone). Listing it explicitly
|
|
# helps pip's resolver converge by constraining scipy early, before it encounters
|
|
# the loose scipy requirements from transitive deps like dm-control and metaworld.
|
|
"scipy>=1.14.0,<2.0.0",
|
|
"lerobot[dynamixel]",
|
|
"lerobot[feetech]",
|
|
"lerobot[damiao]",
|
|
"lerobot[robstride]",
|
|
"lerobot[gamepad]",
|
|
"lerobot[hopejr]",
|
|
"lerobot[lekiwi]",
|
|
"lerobot[openarms]",
|
|
"lerobot[reachy2]",
|
|
"lerobot[rebot]",
|
|
"lerobot[kinematics]",
|
|
"lerobot[intelrealsense]",
|
|
"lerobot[diffusion]",
|
|
"lerobot[multi_task_dit]",
|
|
"lerobot[wallx]",
|
|
"lerobot[pi]",
|
|
"lerobot[molmoact2]",
|
|
"lerobot[smolvla]",
|
|
"lerobot[fastwam]",
|
|
"lerobot[groot]",
|
|
"lerobot[xvla]",
|
|
"lerobot[hilserl]",
|
|
"lerobot[vla_jepa]",
|
|
"lerobot[lingbot_va]",
|
|
"lerobot[async]",
|
|
"lerobot[dev]",
|
|
"lerobot[test]",
|
|
"lerobot[video_benchmark]",
|
|
"lerobot[aloha]",
|
|
"lerobot[pusht]",
|
|
"lerobot[phone]",
|
|
"lerobot[libero]; sys_platform == 'linux'",
|
|
"lerobot[metaworld]",
|
|
"lerobot[sarm]",
|
|
"lerobot[robometer]",
|
|
"lerobot[topreward]",
|
|
"lerobot[peft]",
|
|
# "lerobot[unitree_g1]", TODO: Unitree requires specific installation instructions for unitree_sdk2
|
|
]
|
|
|
|
[project.scripts]
|
|
lerobot-calibrate="lerobot.scripts.lerobot_calibrate:main"
|
|
lerobot-find-cameras="lerobot.scripts.lerobot_find_cameras:main"
|
|
lerobot-find-port="lerobot.scripts.lerobot_find_port:main"
|
|
lerobot-record="lerobot.scripts.lerobot_record:main"
|
|
lerobot-replay="lerobot.scripts.lerobot_replay:main"
|
|
lerobot-setup-motors="lerobot.scripts.lerobot_setup_motors:main"
|
|
lerobot-teleoperate="lerobot.scripts.lerobot_teleoperate:main"
|
|
lerobot-eval="lerobot.scripts.lerobot_eval:main"
|
|
lerobot-train="lerobot.scripts.lerobot_train:main"
|
|
lerobot-train-tokenizer="lerobot.scripts.lerobot_train_tokenizer:main"
|
|
lerobot-dataset-viz="lerobot.scripts.lerobot_dataset_viz:main"
|
|
lerobot-info="lerobot.scripts.lerobot_info:main"
|
|
lerobot-find-joint-limits="lerobot.scripts.lerobot_find_joint_limits:main"
|
|
lerobot-imgtransform-viz="lerobot.scripts.lerobot_imgtransform_viz:main"
|
|
lerobot-edit-dataset="lerobot.scripts.lerobot_edit_dataset:main"
|
|
lerobot-setup-can="lerobot.scripts.lerobot_setup_can:main"
|
|
lerobot-annotate="lerobot.scripts.lerobot_annotate:main"
|
|
lerobot-rollout="lerobot.scripts.lerobot_rollout:main"
|
|
|
|
# ---------------- Tool Configurations ----------------
|
|
|
|
# cu128 wheels keep broad hardware reach; the driver floor is 570.86.
|
|
# To use a different CUDA variant, reinstall torch with an explicit index, e.g.:
|
|
# uv pip install --force-reinstall torch torchvision \
|
|
# --index-url https://download.pytorch.org/whl/cu130
|
|
[[tool.uv.index]]
|
|
name = "pytorch-cu128"
|
|
url = "https://download.pytorch.org/whl/cu128"
|
|
explicit = true
|
|
|
|
[tool.uv.sources]
|
|
torch = [{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" }]
|
|
torchvision = [{ index = "pytorch-cu128", marker = "sys_platform == 'linux'" }]
|
|
|
|
[tool.setuptools.package-data]
|
|
lerobot = ["envs/*.json", "annotations/steerable_pipeline/prompts/*.txt"]
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 110
|
|
exclude = ["tests/artifacts/**/*.safetensors", "*_pb2.py", "*_pb2_grpc.py"]
|
|
|
|
[tool.ruff.lint]
|
|
# 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", "UP", "SIM" #, "A", "S", "D", "RUF"
|
|
]
|
|
ignore = [
|
|
"E501", # Line too long
|
|
"T201", # Print statement found
|
|
"T203", # Pprint statement found
|
|
"B008", # Perform function call in argument defaults
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"__init__.py" = ["F401", "F403", "E402"]
|
|
# E402: conditional-import guards (TYPE_CHECKING / is_package_available) must precede the imports they protect
|
|
"src/lerobot/scripts/convert_dataset_v21_to_v30.py" = ["E402"]
|
|
"src/lerobot/policies/wall_x/**" = ["N801", "N812", "SIM102", "SIM108", "SIM210", "SIM211", "B006", "B007", "SIM118"] # Supprese these as they are coming from original Qwen2_5_vl code TODO(pepijn): refactor original
|
|
|
|
[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
|
|
|
|
[tool.bandit]
|
|
exclude_dirs = [
|
|
"tests",
|
|
"benchmarks",
|
|
"src/lerobot/datasets/push_dataset_to_hub",
|
|
]
|
|
skips = ["B101", "B311", "B404", "B603", "B615"]
|
|
|
|
[tool.typos]
|
|
default.extend-ignore-re = [
|
|
"(?Rm)^.*(#|//)\\s*spellchecker:disable-line$", # spellchecker:disable-line
|
|
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on", # spellchecker:<on|off>
|
|
]
|
|
default.extend-ignore-identifiers-re = [
|
|
# Add individual words here to ignore them
|
|
"2nd",
|
|
"pn",
|
|
"ser",
|
|
"ein",
|
|
"thw",
|
|
"inpt",
|
|
"arange",
|
|
"is_compileable",
|
|
"ROBOTIS",
|
|
"OT_VALUE",
|
|
"VanderBilt",
|
|
"seperated_timestep",
|
|
]
|
|
|
|
# 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"]
|
|
|
|
# TODO: Enable mypy gradually module by module across multiple PRs
|
|
# Uncomment [tool.mypy] first, then uncomment individual module overrides as they get proper type annotations
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
ignore_missing_imports = true
|
|
follow_imports = "skip"
|
|
# warn_return_any = true
|
|
# warn_unused_configs = true
|
|
# strict = true
|
|
# disallow_untyped_defs = true
|
|
# disallow_incomplete_defs = true
|
|
# check_untyped_defs = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.*"
|
|
ignore_errors = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.envs.*"
|
|
ignore_errors = false
|
|
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.utils.*"
|
|
# ignore_errors = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.configs.*"
|
|
ignore_errors = false
|
|
|
|
# extra strictness for configs
|
|
disallow_untyped_defs = true
|
|
disallow_incomplete_defs = true
|
|
check_untyped_defs = true
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.optim.*"
|
|
ignore_errors = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.model.*"
|
|
ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.processor.*"
|
|
# ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.datasets.*"
|
|
# ignore_errors = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.cameras.*"
|
|
ignore_errors = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.motors.*"
|
|
ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.robots.*"
|
|
# ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.teleoperators.*"
|
|
# ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.policies.*"
|
|
# ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.rl.*"
|
|
# ignore_errors = false
|
|
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.async_inference.*"
|
|
# ignore_errors = false
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = "lerobot.transport.*"
|
|
ignore_errors = false
|
|
|
|
# [[tool.mypy.overrides]]
|
|
# module = "lerobot.scripts.*"
|
|
# ignore_errors = false
|