From 731576be807ffba386b403b3c208ab80cc5a5676 Mon Sep 17 00:00:00 2001 From: Pepijn Date: Tue, 12 May 2026 18:34:42 +0200 Subject: [PATCH] chore(smolvla2-runtime): auto-fire one tick at dry-run startup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the dry-run REPL only ticked on user input (empty Enter just redrew), so the bisection test "does the LM head produce text on start_frame=0?" required typing something arbitrary to drive a tick. Just run ``step_once`` at startup — the obs diagnostic *and* the subtask gen both fire automatically, the diag row populates, and the operator can read the result before pressing any key. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../scripts/lerobot_smolvla2_runtime.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lerobot/scripts/lerobot_smolvla2_runtime.py b/src/lerobot/scripts/lerobot_smolvla2_runtime.py index 8923fa5f4..d389ffe5b 100644 --- a/src/lerobot/scripts/lerobot_smolvla2_runtime.py +++ b/src/lerobot/scripts/lerobot_smolvla2_runtime.py @@ -1318,15 +1318,21 @@ def main(argv: list[str] | None = None) -> int: initial_task=args.task, max_ticks=args.max_ticks, ) - # Fire the observation provider once at startup so the - # ``_log_obs_tensors_once`` diagnostic prints before the REPL - # blocks on stdin. The REPL otherwise only ticks on user input — - # useful for the train/inference tensor-comparison workflow. + # Fire one full pipeline tick at startup so the obs diagnostic + # *and* the subtask generation actually run before the REPL + # blocks on stdin. The REPL otherwise only ticks on user input, + # which made the dry-run bisection test (does the LM head produce + # text at start_frame=0?) require typing something. Doing + # ``step_once`` here means the diag row populates without any + # manual interaction. if observation_provider is not None: try: - _ = observation_provider() + startup_logs = runtime.step_once() except Exception as exc: # noqa: BLE001 - logger.warning("startup obs probe failed: %s", exc) + logger.warning("startup tick failed: %s", exc) + startup_logs = [] + for line in startup_logs or []: + print(f"[smolvla2] {line}", flush=True) return _run_repl(runtime, initial_task=args.task, max_ticks=args.max_ticks)