From 0410705aff59b05bb69c7c479d9e20c9fa85cff5 Mon Sep 17 00:00:00 2001 From: Pepijn Date: Tue, 12 May 2026 18:12:27 +0200 Subject: [PATCH] chore(smolvla2-runtime): print live state vector once at startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So the operator can compare live joint values to the dataset's ``observation.state`` mean/std and spot when the robot's home pose is several σ off the supervised support region. State OOD is the remaining viable hypothesis for why the live LM head collapses to ``\n`` even though images are pixel-shape-matched. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/lerobot/scripts/lerobot_smolvla2_runtime.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/lerobot/scripts/lerobot_smolvla2_runtime.py b/src/lerobot/scripts/lerobot_smolvla2_runtime.py index 06c507460..58d9cd0dd 100644 --- a/src/lerobot/scripts/lerobot_smolvla2_runtime.py +++ b/src/lerobot/scripts/lerobot_smolvla2_runtime.py @@ -671,6 +671,22 @@ def _build_robot_observation_provider( img, (target_w, target_h), interpolation=_cv2.INTER_AREA ) _resize_logged["done"] = True + # Also print the state vector once so the operator + # can eyeball it against the dataset's stats. State + # OOD is a real failure mode for VLAs — the prefix + # carries state via the projection layer, and a + # neutral home pose can easily sit a couple σ off + # the supervised support region. + if "observation.state" in (ds_features or {}): + state_names = ( + ds_features["observation.state"].get("names") or [] + ) + state_vals = [raw.get(n) for n in state_names] + logger.warning( + "robot state at startup: %s", + {n: round(v, 2) if isinstance(v, float) else v + for n, v in zip(state_names, state_vals, strict=False)}, + ) except Exception as exc: # noqa: BLE001 logger.warning("camera resize to dataset shape failed: %s", exc)