Commit Graph

1430 Commits

Author SHA1 Message Date
Pepijn 34588453ef fix: integrate PR #3396 review feedback
- processor(vlabench): drop the no-op `VLABenchProcessorStep` and
  let `VLABenchEnv` fall back to the identity `get_env_processors`
  default. Removes the class, its export, and its override.
- envs(vlabench): hoist `import cv2` to module scope; propagate the
  gym `seed` into the inner dm_control env (re-seeding `task.random`
  and the env's `_random_state`) so layout sampling is reproducible.
- docs(vlabench): mirror the CI eval command across all four
  snippets (`--eval.use_async_envs=false`, `--policy.device=cuda`,
  and the `rename_map` for image/second_image/wrist_image →
  camera1/2/3). Intro now calls out that LeRobot exposes 43 of
  VLABench's 100 upstream task categories via `--env.task`.
- docker(vlabench): drop the `|| echo WARN` fallback on the gdown
  asset-download path so a genuine download failure surfaces
  instead of being masked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 10:25:42 +02:00
Pepijn 46d914a001 Merge branch 'main' into feat/vlabench-benchmark 2026-04-20 10:24:41 +02:00
Defalt 5c43fa1cce fix(policies): replace deprecated torch.cuda.amp.autocast with torch.amp.autocast (#3167)
Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
2026-04-19 16:25:08 +02:00
k1000dai 3f16d98a9b episods→episodes (#3410)
Fixing typo
2026-04-19 12:58:06 +02:00
whats2000 52f508c51c fix(dataset): cleanup_interrupted_episode wipes image temp dirs (#3405) 2026-04-19 12:04:24 +02:00
Steven Palma a8b72d9615 feat(dataset): 2x faster dataloader via parallel decode, uint8 transport, and persistent workers (#3406)
* feat(dataset): 2xfaster dataloader

* fix(dataset): streaming return uint8 decode

* fix(tests): adjust normalization step comparison

* fix(dataset): with threadexecutor + False default

* chore(dataset): make it a config

* fix(test): account for uint8 in training path testing
2026-04-19 00:08:22 +02:00
Steven Palma 760220d532 chore(dependencies): update uv.lock (#3365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-04-18 22:32:05 +02:00
Shu Jiuhe a99943ca26 Improve loading performance in _absolute_to_relative_idx when remapping indices (#3279) 2026-04-18 19:28:50 +02:00
Cheng Yin a9821af61b fix(record): pass rename_map to make_policy in lerobot-record (#3240)
* fix(record): pass rename_map to make_policy in lerobot-record

Fixes #3181. The rename_map from dataset config was used for preprocessor
construction but not passed to make_policy(), causing feature mismatch
errors when camera key names differ between dataset and model config.

make_policy() already accepts a rename_map parameter and uses it to skip
visual feature consistency validation when remapping is active, but
lerobot_record.py was not passing it through.

* style: fix ruff format for ternary expression

---------

Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
2026-04-17 16:40:08 +02:00
Pepijn 8d45b2ce72 fix(vlabench): retry unstable reset, graceful PhysicsError on step
VLABench's LM4ManipDMEnv.reset() runs 20 warm-up `step()` calls while
toggling gravity / fluid coefficients to settle the scene. For some
random layout samples MuJoCo's integrator diverges and raises
`mjWARN_BADQACC` -> `dm_control.rl.control.PhysicsError` before we
ever get to return from reset. In a multi-task smoke eval that kills
the whole run at the next task's env construction.

- `_ensure_env`: catch PhysicsError and retry `load_env()` up to five
  times with a fresh random layout. Almost always converges; if it
  really can't, re-raise the last exception.
- `step`: wrap `self._env.step(ctrl)` in a PhysicsError handler. On
  divergence, terminate the episode gracefully (is_success=False,
  terminated=True, info['physics_error']=True) and drop the stale
  inner env so the next reset rebuilds it. Keeps the rest of the
  multi-task eval moving instead of propagating a hard crash.

Made-with: Cursor
2026-04-17 15:34:22 +01:00
Pepijn 1747767111 fix(pyproject): drop unresolvable vlabench extra
VLABench is not on PyPI — its only distribution is the
OpenMOSS/VLABench GitHub repo (package name `VLABench`, no PyPI
release) — so the `vlabench>=0.1.0` spec in the `[vlabench]` extra
was flatly unsatisfiable. Every `uv sync` (even with unrelated
extras like `--extra test`) validates the full lockfile graph and
tripped on this, breaking the fast-test CI step.

- Remove `vlabench = [...]` from pyproject.toml (left an explanatory
  comment in its place) and drop the `lerobot[vlabench]` entry from
  the `all` extra.
- Update docs/source/vlabench.mdx to document the manual
  `git clone` + editable install flow for VLABench, rrt-algorithms
  and the MuJoCo / dm_control pins — same pattern as robocasa.
- Docker image already does this via explicit git clones, so no CI
  image change is needed.

Made-with: Cursor
2026-04-17 14:07:19 +01:00
Pepijn 33864a32c2 docs(vlabench): align page with adding_benchmarks template
Rework docs/source/vlabench.mdx to follow the standard benchmark doc
structure: intro + links + available tasks (with cleaner counts and
comma-list shortcuts) + installation + eval + recommended episodes +
policy I/O + training + reproducing results.

- Point everything at lerobot/smolvla_vlabench (the released
  checkpoint) rather than a generic "your-policy-id" placeholder.
- Document the three valid `--env.task` forms (single, comma list,
  suite shortcut).
- Drop the "Evaluation tracks" table — it reflected the upstream
  paper rather than what the LeRobot env exposes, and was confusing.
- Add an explicit "Reproducing published results" section pointing
  at the CI smoke eval.

Made-with: Cursor
2026-04-17 13:45:18 +01:00
Pepijn 893b10b825 ci(vlabench): smoke-eval 10 tasks instead of 1
Broader coverage on the VLABench benchmark CI job: bump the smoke eval
from 1 task to 10 (one episode each), all drawn from PRIMITIVE_TASKS.

Tasks now run: select_fruit, select_toy, select_book, select_painting,
select_drink, select_ingredient, select_mahjong, select_poker,
add_condiment, insert_flower.

Bumped the parse_eval_metrics.py `--task` label to the full comma
list so the metrics artifact reflects what was actually run.
`parse_eval_metrics.py` already reads `overall` for multi-task runs,
so no parser change is needed.

Made-with: Cursor
2026-04-17 13:40:42 +01:00
Pepijn 0ac6118bc5 fix(vlabench): refetch dm_control physics on every step
`env.physics` in dm_control is a weakref proxy; caching it in
`_ensure_env` and reusing across steps/resets yields a
`ReferenceError: weakly-referenced object no longer exists` once the
underlying sim is rebuilt (e.g. after the first reset of a composer
environment). Drop the cache and refetch `self._env.physics` at the
call sites (step and IK) — it's a cheap attribute access.

Made-with: Cursor
2026-04-17 12:02:47 +01:00
Steven Palma d4a229444b fix(ci): not fail when skipped (#3399) 2026-04-17 12:02:38 +02:00
Pepijn e3de973173 fix(docker): validate VLABench asset download + install hf_xet
The previous HF Hub snapshot_download step could complete silently
without actually populating the asset tree — several files in
lerobot/vlabench-assets are Xet-stored, and the stock huggingface_hub
install in the base image can skip them. The first runtime signal was
an IndexError deep inside VLABench's task builder (random.choice on an
empty XML list in config_manager.py), far from the real cause.

- Install huggingface_hub[hf_xet]>=0.26 before the snapshot download
  so Xet-stored assets are fetched reliably.
- Scope the download with allow_patterns=['obj/**', 'scenes/**'] (the
  only subtrees the env needs), reducing image size and surface area.
- Add a build-time validator: after the download, walk four
  task-critical subtrees (plates, basket, fruit, tray) and fail the
  build loudly with the list of empty dirs if any is missing XMLs.
  Prints XML counts when successful so CI logs confirm completeness.

Made-with: Cursor
2026-04-17 10:59:46 +01:00
Steven Palma 098ebb4d72 feat(ci): send slack notification if latest dependecy test is broken (#3398) 2026-04-17 11:28:24 +02:00
Pepijn 0ceb6a25e8 ci(vlabench): point Docker build at HF Hub asset mirror
Pass VLABENCH_ASSETS_REPO=lerobot/vlabench-assets so the image pulls
mesh + scene assets from HF Hub (reliable) instead of hitting Google
Drive quotas.

Made-with: Cursor
2026-04-17 09:51:45 +01:00
Pepijn 9712c49b72 fix(docker): make VLABench asset download tolerant + HF mirror option
Google Drive returns HTTP 429 ("too many users") on VLABench's shared
academic asset file, blocking CI builds unpredictably.

- Add VLABENCH_ASSETS_REPO build arg: when set, snapshot_download the
  given HF Hub dataset repo straight into VLABench/assets/. This is the
  reliable path for CI once a mirror is uploaded.
- Keep the gdown script as fallback but make it best-effort (|| echo WARN)
  so quota errors don't block the image build.

If neither source succeeds, the constant.py patch (empty-dir guard)
keeps module import working; only task-build at runtime will surface
missing-mesh errors.

Made-with: Cursor
2026-04-17 09:36:49 +01:00
Pepijn ece993353f feat(vlabench): wire up dm_control IK for 7D EEF actions
VLABench's dataset logs 7D actions [x, y, z, rx, ry, rz, gripper] in
end-effector space, but its dm_control task writes `data.ctrl[:] = action`
directly, which for Franka expects 9 joint entries (7 arm + 2 gripper
fingers). Previously we zero-padded the action, which physically moved
nothing meaningful.

Add `_build_ctrl_from_action` that mirrors what VLABench's data collector
uses (SingleArm.get_qpos_from_ee_pos, backed by dm_control's
qpos_from_site_pose IK solver):
- decompose EEF action into (pos, euler, gripper)
- euler XYZ -> quat (w, x, y, z)
- IK solve for 7 arm joint qposes targeting that EEF pose
- map gripper scalar [0..1] linearly to Franka finger qpos [0.04..0.0]

Joint-space actions (shape == ctrl_dim) still pass through unchanged.

Made-with: Cursor
2026-04-16 22:36:47 +02:00
Pepijn c1ca9aad14 fix(vlabench): pad action to match data.ctrl dim
VLABench's dm_control task does `data.ctrl[:] = action` without any
adaptation. Franka has 9 actuators (7 arm + 2 gripper fingers) but
our policy emits a 7D action, causing a broadcast error. Pad with
zeros / repeat the gripper command for trailing actuators.

Made-with: Cursor
2026-04-16 22:28:21 +02:00
Pepijn db85b296ee fix(vlabench): bulletproof camera obs coercion to (h, w, 3) uint8
Previous resize path only kicked in when shape[:2] mismatched, so
arrays with wrong channel count or unexpected layouts (e.g. HWC
arriving as HWC but treated as CHW and transposed into junk shape)
could still slip through. New _to_hwc3 helper:
- strips leading singleton batch dims
- auto-detects CHW vs HWC via channel size
- normalizes 1/4-channel to 3 channels
- resizes to (h, w) and casts to uint8 unconditionally

Made-with: Cursor
2026-04-16 22:00:28 +02:00
Pepijn 63dbdf0e55 fix(vlabench): re-install lerobot editably + coerce agent_pos shape
- The nightly base image has stale lerobot code (pre-dates VLABenchEnv
  addition), so COPY . . doesn't propagate into .venv. Run
  `uv pip install --no-deps -e .` after COPY, same fix as robocasa365.
- Coerce ee_state to exactly shape (7,) so SyncVectorEnv.concatenate
  doesn't raise "Output array is the wrong shape" when VLABench's
  actual ee_state length differs from our declared observation_space.

Made-with: Cursor
2026-04-16 21:36:18 +02:00
Pepijn da7fb54c64 fix(vlabench): resize images to declared observation_space shape
VLABench's load_env doesn't always honor render_resolution, so the
returned rgb frames may not match our declared (h, w, 3) observation
space. gymnasium's SyncVectorEnv.concatenate then raises
"Output array is the wrong shape". Resize to the declared (h, w).

Made-with: Cursor
2026-04-16 21:13:18 +02:00
Pepijn 5161d06f32 fix(docker): download VLABench mesh assets (required for tasks)
Task configs reference object meshes (obj/meshes/fruit/, containers/*)
via name2class_xml; without them, random.choice([]) crashes during
task build. Install gdown and run VLABench's download_assets.py script
to fetch the asset + scene archives from Google Drive.

Made-with: Cursor
2026-04-16 20:22:13 +02:00
Pepijn 07b0ad8831 fix(docker): add openai dep for VLABench gpt_utils
VLABench.utils.gpt_utils imports openai (for LLM instruction generation).
Triggered transitively via dm_task.py. Not used by eval but required
at import time.

Made-with: Cursor
2026-04-16 20:07:09 +02:00
Pepijn 9c454a42e8 fix(docker): install rrt-algorithms via editable clone
rrt_algorithms/rrt/ has no __init__.py, so find_packages() excludes
it from the built wheel (same issue as VLABench/utils/). Clone the
repo and install with -e so imports resolve from the source tree.

Made-with: Cursor
2026-04-16 19:55:38 +02:00
Pepijn 5d594dc696 fix(docker): install rrt-algorithms for VLABench skill_lib
VLABench.utils.skill_lib imports rrt_algorithms (GitHub-only package,
not on PyPI). Triggered transitively via dm_task.py on any task import.

Made-with: Cursor
2026-04-16 19:18:45 +02:00
Pepijn 85222071eb fix(docker): patch VLABench constant.py for missing mesh assets
VLABench's configs/constant.py calls os.listdir() on ~100 asset
directories (obj/meshes/*) at module import time. These dirs come
from a Google Drive download we skip in CI. Patch get_object_list
to return [] for missing dirs instead of crashing with FileNotFoundError.

Made-with: Cursor
2026-04-16 18:59:02 +02:00
Pepijn d6f71903ef fix(vlabench): import robots/tasks to populate VLABench registry
VLABench uses decorator-based registration (@register.add_robot,
@register.add_task). Importing only VLABench.envs doesn't trigger
the robot/task module imports, so the registry is empty at load_env
time. Import VLABench.robots and VLABench.tasks explicitly.

Made-with: Cursor
2026-04-16 18:29:42 +02:00
Pepijn 672ba4f050 fix(docker): unpin open3d (0.18.0 lacks Python 3.12 wheels)
Made-with: Cursor
2026-04-16 18:07:43 +02:00
Pepijn ec0a5eb5be fix(docker): add VLABench undeclared deps (open3d, colorlog, sklearn)
VLABench's setup.py doesn't list all its imports. The env crashes
on `import open3d` at runtime. Add the missing runtime deps.

Made-with: Cursor
2026-04-16 18:01:20 +02:00
Maxime Ellerbach 9bc2df80bb chore(docs): adding a jupyter notebook that gives you ready-to-paste commands (#3395)
* chore(docs): adding an example quickstart jupyter notebook that gives you ready-to-paste commands

* some fixes in the commands

* uv lock

* Adding notebook to all

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Maxime Ellerbach <maxime@ellerbach.net>

* uv lock again

---------

Signed-off-by: Maxime Ellerbach <maxime@ellerbach.net>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-04-16 17:53:35 +02:00
Pepijn 1261680129 fix(docker): drop VLABench asset download step
download_assets lives in scripts/download_assets.py (not
VLABench.utils) and downloads from Google Drive via gdown, which
is unreliable in CI. Our smoke test uses its own eval pipeline and
does not need these assets.

Made-with: Cursor
2026-04-16 17:45:53 +02:00
Pepijn 508d977a16 fix(docker): clone VLABench to home dir (non-root user)
The base image runs as user_lerobot which cannot write to /opt.

Made-with: Cursor
2026-04-16 17:39:26 +02:00
Pepijn af551b057a fix(docker): editable VLABench install for missing __init__.py
VLABench/utils/ has no __init__.py, so find_packages() omits it
from built wheels. Use editable install (-e) so Python imports
directly from the source tree via implicit namespace packages.

Made-with: Cursor
2026-04-16 17:35:53 +02:00
Pepijn a81df9877c fix(docker): shallow-clone VLABench to skip SSH-only submodules
The VLABench repo's nested submodules (openpi -> aloha, libero) use
git@github.com SSH URLs which fail in Docker builds without SSH.
Clone with --depth 1 (no submodule recursion) and install from the
local checkout instead.

Made-with: Cursor
2026-04-16 17:25:36 +02:00
Pepijn 8053f2eea0 fix(docker): install VLABench from GitHub, not PyPI
VLABench is not published on PyPI. Install from the OpenMOSS/VLABench
GitHub repo directly.

Made-with: Cursor
2026-04-16 17:04:09 +02:00
Pepijn 1a0aaf64f4 fix(docker): use uv pip for VLABench install and fail on errors
The base image (lerobot-gpu) uses uv, not pip. The previous `pip install`
silently failed ("pip: not found") and `|| true` hid the error, resulting
in an image with no VLABench installed.

Made-with: Cursor
2026-04-16 16:57:53 +02:00
Pepijn ac52d5b342 ci: skip Docker Hub login when secrets are unavailable
The docker/login-action fails hard when DOCKERHUB_LEROBOT_USERNAME is
empty (e.g. fork PRs). Since all jobs use push: false (local build only),
the login is just for pull rate limit avoidance — make it conditional.

Made-with: Cursor
2026-04-16 16:31:35 +02:00
pepijn 566d28130f ci: use lerobot/smolvla_vlabench checkpoint for VLABench smoke eval
Wire the trained SmolVLA-VLABench checkpoint into the CI smoke test
with the correct rename_map for the 3-camera dataset layout.

Made-with: Cursor
2026-04-16 14:08:43 +00:00
Remy bd74f6733d chore: bump doc-builder SHA for PR upload workflow (#3386) 2026-04-15 12:15:24 +02:00
Steven Palma 6f4a96333e chore(docs): update contributing (#3387) 2026-04-15 11:02:37 +02:00
Steven Palma 9021d2d240 refactor(imports): enforce guard pattern (#3382)
* refactor(imports): enforce guard pattern

* fix(tests): skip reachy2 if not installed

* Address review feedback
2026-04-14 22:54:05 +02:00
Khalil Meftah 60e7d67cb8 fix: catch KeyboardInterrupt in safe_stop_image_writer to prevent corrupted frames (#3381) 2026-04-14 18:22:56 +02:00
Radu 1ede000bdd fix(rl): swap dict merge order to preserve teleop intervention flag (#3273)
Co-authored-by: Khalil Meftah <khalil.meftah@huggingface.co>
2026-04-14 16:20:54 +02:00
Khalil Meftah d57c58a532 fix: add thread synchronization to ReplayBuffer to prevent race condition between add() and sample() (#3372) 2026-04-14 13:16:45 +02:00
Matteo Tiezzi b3e76a92f2 fix(groot): compatibility fixes for gr00t in v0.5 (#3182)
* fix(groot): apply groot 0.5 fixes

* fix(groot): correct indentation and add tile count in Eagle25VL processor

* Fixed lint7/style
2026-04-14 13:09:18 +02:00
Khalil Meftah f5c801fd34 fix(test): add missing device placement in multi-task DiT tests (#3349) 2026-04-14 12:25:29 +02:00
Ethan Pronovost cff4bcf4a0 Update reward classifier training config (#3147)
Co-authored-by: Khalil Meftah <khalil.meftah@huggingface.co>
2026-04-14 11:28:49 +02:00