diff --git a/docker/Dockerfile.benchmark.vlabench b/docker/Dockerfile.benchmark.vlabench index 57947d725..0a5dbd6c7 100644 --- a/docker/Dockerfile.benchmark.vlabench +++ b/docker/Dockerfile.benchmark.vlabench @@ -50,4 +50,8 @@ RUN python ~/VLABench/scripts/download_assets.py --choice all # Overlay the PR's source code on top of the nightly image. COPY --chown=user_lerobot:user_lerobot . . +# Re-install lerobot editably so the new source (with VLABenchEnv registration +# and updated obs handling) replaces the stale package baked into the nightly image. +RUN uv pip install --no-cache --no-deps -e . + CMD ["/bin/bash"] diff --git a/src/lerobot/envs/vlabench.py b/src/lerobot/envs/vlabench.py index a1dbe78e3..86e16b0dc 100644 --- a/src/lerobot/envs/vlabench.py +++ b/src/lerobot/envs/vlabench.py @@ -248,8 +248,14 @@ class VLABenchEnv(gym.Env): images[key] = cv2.resize(images[key], (w, h), interpolation=cv2.INTER_AREA).astype(np.uint8) - # Extract end-effector state + # Extract end-effector state — coerce to exactly (7,) so vector env concat + # doesn't fail with shape-mismatch on buffer np.stack. ee_state = obs.get("ee_state", np.zeros(7, dtype=np.float64)) + ee_state = np.asarray(ee_state, dtype=np.float64).ravel() + if ee_state.shape[0] != 7: + fixed = np.zeros(7, dtype=np.float64) + fixed[: min(7, ee_state.shape[0])] = ee_state[:7] + ee_state = fixed if self.obs_type == "pixels": return {"pixels": images}