chore(smolvla2-runtime): print live state vector once at startup

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) <noreply@anthropic.com>
This commit is contained in:
Pepijn
2026-05-12 18:12:27 +02:00
parent 398a8cf730
commit 0410705aff
@@ -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)