Commit Graph

1946 Commits

Author SHA1 Message Date
Pepijn 5b8e6ffe8e refactor pi052 to reuse pi05 2026-07-15 19:26:55 +02:00
Pepijn 55d9ff740e fix quality formatting 2026-07-15 18:27:13 +02:00
Pepijn ccecdbc769 Merge branch 'main' into feat/smolvla-on-steerable 2026-07-15 18:18:33 +02:00
Pepijn 0fe31bfae1 fix pi052 runtime and training safety 2026-07-15 18:17:23 +02:00
Liang Su 3cec067795 perf(pi052): optimize flow and full-training paths (#3974)
* perf(pi052): optimize equivalent training paths

* fix(pi052): guard FlexAttention backend selection
2026-07-15 17:26:55 +02:00
Steven Palma 3f2179f3b6 refactor(evo1): use transformers flash attention probe (#4013)
Co-authored-by: Martino Russi <77496684+nepyope@users.noreply.github.com>
2026-07-15 17:02:01 +02:00
Nikodem Bartnik 867b58cfb2 generate new readme (#4029)
Co-authored-by: Pepijn <138571049+pkooij@users.noreply.github.com>
2026-07-15 16:32:02 +02:00
Pepijn d304d75ad7 chore: trim training comments and obsolete rerun test 2026-07-15 16:25:25 +02:00
Pepijn 6795b22b1e refactor(factory): remove PI052 processor overrides 2026-07-15 16:07:14 +02:00
Pepijn eddf75616e fix(processor): serialize FAST token mapping 2026-07-15 16:04:26 +02:00
Pepijn a09715121e refactor(runtime): reuse shared rerun visualization 2026-07-15 15:59:13 +02:00
Pepijn ad885c098d refactor(runtime): remove gibberish filtering 2026-07-15 15:55:26 +02:00
Pepijn f76e6b0841 refactor(pi052): use standard processor loading 2026-07-15 15:52:28 +02:00
Pepijn 696e68869c feat(pi0-fast): support automatic tokenizer fitting 2026-07-15 15:46:04 +02:00
Pepijn 2749cf7767 refactor(pi052): remove debug prediction dumps 2026-07-15 15:35:08 +02:00
Pepijn ca42fa2f92 docs: explain hierarchical policy adapters 2026-07-15 15:27:38 +02:00
Pepijn 2f64b85f00 revert(datasets): drop unrelated version error change 2026-07-15 15:24:38 +02:00
Pepijn 9cd8efc5c8 docs: compact language runtime comments 2026-07-15 15:19:52 +02:00
Pepijn d3ad24d9dd revert(datasets): use main package exports 2026-07-15 15:12:17 +02:00
Pepijn ca5be5b482 revert(config): drop train config comment change 2026-07-15 15:09:07 +02:00
Pepijn ffdd87fdac docs(recipes): compact language recipe comments 2026-07-15 15:08:20 +02:00
Pepijn 2e43ca0d54 docs(pi052): describe merged training optimizations 2026-07-15 15:07:01 +02:00
Pepijn 5242e9195c fix(pi052): use base learning rate for lm head 2026-07-15 15:06:22 +02:00
Pepijn 6a89c7be45 fix(pi052): default flow loss weight to ten 2026-07-15 15:05:13 +02:00
Pepijn 0a7b21cdd0 refactor(train): remove wandb example tables 2026-07-15 14:05:50 +02:00
Pepijn 07e75d94be refactor(runtime): remove compatibility aliases 2026-07-15 14:04:12 +02:00
Pepijn 6094058203 docs: add PI052 training and inference guide 2026-07-15 13:58:32 +02:00
Pepijn 7c125c0028 style: compact comments in language runtime 2026-07-15 13:52:52 +02:00
Pepijn 1eed8df1c4 style: add missing license headers 2026-07-15 13:42:45 +02:00
Pepijn 87585195e6 style(wandb): move training example imports to module scope 2026-07-15 13:41:39 +02:00
Pepijn 94dc85b443 refactor(runtime): remove dataset replay mode 2026-07-15 13:39:54 +02:00
Pepijn 8593ff081b refactor(runtime): reuse rollout context and remove dead code 2026-07-15 13:31:24 +02:00
Pepijn 1f00078cc7 fix(robocasa): render overlay text once 2026-07-15 12:07:23 +02:00
Pepijn 279c6c7af3 feat(annotate): improve VLM subtask annotation (legible contact sheets, seeded relabeling, self-hosted vLLM recipe) (#3896)
* feat(annotate): WGO-tuned subtask prompt (atomic completed-events + duration prior)

Rework the plan-module subtask segmentation prompt toward the WGO-Bench
atomic annotation protocol: segment by completed world-state changes
(grasp/place/open/close/pour/insert), fold approach+retreat into their
event, keep separate events separate, and add a 2-10s duration prior.
Drops the pi0.7 "fewer larger composites preferred" bias that drove
under-segmentation on the benchmark. Output JSON shape unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(annotate): seeded-relabeling second pass for subtasks

Add an opt-in relabel pass (plan.subtask_seeded_relabel) that, after
segmentation, re-labels each span using previous/current/next segment
contact sheets and the seed label as a strong prior, minimally correcting
it. Mirrors macrodata's best end-to-end labeling step. Boundaries are
untouched; one extra VLM call per span. Off by default.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(annotate): robust OpenAI-compat client for hosted VLMs

Guard against a choice with no message (safety filter or a thinking model
that spends its whole budget before emitting content) so one empty reply
no longer crashes the whole annotation run; treat it as an empty response
and let the existing JSON-retry path handle it.

Add an optional `reasoning_effort` knob on VlmConfig, forwarded to the
server when set, to cap a thinking model's reasoning (needed for Gemini
via its OpenAI-compatible endpoint).

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(annotate): legible tile-scaled timestamp on contact sheets

The burned-in timestamp used the ~10px bitmap default font, which blurs
once the model downsamples a full contact sheet into 768px tiles, so the
VLM can no longer read the exact source time a boundary depends on. Scale
the timestamp to the tile height (with a graceful fallback on older
Pillow) so the visual time cue stays readable at sheet resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(annotate): lean GEPA-aligned subtask segmentation prompt

Replace the verbose, label-heavy segmentation prompt with a lean
adaptation of the blog's GEPA-found completed_events_duration_prior
recipe: focus on completed manipulation events, explicit no-split /
no-merge rules, a 2-10s duration prior, and an instruction to prioritize
temporally correct boundaries over label wording. The previous prompt
over-weighted label guidance, which traded away boundary precision.

Co-authored-by: Cursor <cursoragent@cursor.com>

* revert: restore original subtask segmentation prompt

The lean GEPA-aligned paraphrase (dd4b0110d) regressed Gemini on the
30-ep subset: Seg F1 0.259 -> 0.189 and E2E 0.184 -> 0.135, driven by
worse under-segmentation (224 -> 188 preds). The blog's 0.306 came from
the actual GEPA-search artifact, which a hand paraphrase does not
reproduce. Restore the original prompt, which remains our best config.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(annotate): env-var override for prompt templates

Allow LEROBOT_PROMPT_OVERRIDE_<name> to supersede the packaged prompt
file at load time. Enables prompt search (GEPA) to inject candidate
segmentation prompts into a remote annotate job via an env secret,
without committing a branch per candidate.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(annotate): genericize hosted-VLM comments (no model name)

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs(annotate): document seeded-relabel and reasoning_effort flags

Co-authored-by: Cursor <cursoragent@cursor.com>

* test(annotate): update subtask-prompt marker to match WGO-tuned prompt

The three plan-module tests keyed the canned VLM responder on the
literal 'atomic subtasks', which the WGO-tuned segmentation prompt no
longer contains (it now segments 'COMPLETED manipulation events'). Point
the fixture markers at the current wording so the subtask call is matched
again.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-15 11:38:49 +02:00
Pepijn dbb7f5b769 feat(rollout): integrate language runtime 2026-07-15 11:31:19 +02:00
pepijn223 dca4c2f8cc feat(runtime): add --policy.device to override checkpoint device
Some checkpoints ship config.device=cpu (e.g. MolmoAct2 SO100/101). The
language runtime had no device override, so it always ran on the config
device. --policy.device=cuda (or cpu) now overrides cfg.device at load.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 19:11:29 +02:00
Pepijn cb971cc12b feat(runtime): allow autonomous robot mode without --dataset.repo_id
Load normalization stats from the checkpoint (norm_tag) and derive the
observation/action feature schema from the connected robot when no dataset
is given, mirroring lerobot-rollout. A dataset is still honoured when
supplied and its stats take precedence.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 18:15:03 +02:00
pepijn223 7632922fb3 feat(runtime): MolmoAct2 language-runtime adapter (direct-subtask)
Enable running MolmoAct2 policies (e.g. on an SO101) in the interactive
language runtime with direct-subtask prompting.

- policies/molmoact2/molmoact2_adapter.py: MolmoAct2PolicyAdapter — flat VLA
  bridge; select_action predicts an action chunk from the packed observation,
  generate_text is a no-op (no text head; use --direct_subtask).
- runtime/registry.py: register "molmoact2" -> MolmoAct2PolicyAdapter.
- runtime/cli.py:
  - Preserve model-input keys emitted outside observation.* (MolmoAct2 packs
    the prompt+images into input_ids/pixel_values/...) through the robot
    observation filter; no-op for PI0-family policies.
  - Robot observation provider now reads the live task/subtask each frame via a
    get_task callback, so a typed command re-packs the instruction (also fixes
    stale-task for other flat VLAs). Bound to runtime state after creation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 16:46:20 +02:00
pepijn223 9f0e4dfb53 fix(pi052): accept use_flex_attention config field for checkpoint compat
Newer PI052 training runs serialize use_flex_attention into config.json.
This branch's attention path is SDPA/eager (mathematically equivalent), so
the field is accepted as an inert no-op (mirrors the existing use_hf_kernels
compat field) — otherwise loading those checkpoints raises DecodingError.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-13 16:46:10 +02:00
pepijn223 33f0414733 feat(runtime): add --fp8 flag to enable PI052 FlashRT FP8 MLPs
Wire the existing (but previously unreachable from the runtime) PI052
FlashRT FP8 MLP swap into the language runtime. --fp8 sets
config.use_flashrt_fp8_mlp before load; the policy calibrates and swaps
every Gemma + SigLIP MLP to fused FP8 on its first predict_action_chunk.
Ignored with a warning for policies without the flag (PI052 only).

Measured ~1.12x faster action-chunk inference (124 -> 111 ms) on an
RTX 5090; needs the `kernels` package (pin <0.13 for transformers) and
CUDA SM>=8.9, else it degrades to BF16.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 13:36:48 +02:00
pepijn223 1e94a4f62d feat(runtime): real-robot interactive mode + rerun live camera view
Add physical-robot support to the language runtime, plus a live rerun viewer.

- runtime/rerun_viz.py: headless rerun gRPC + web viewer; logs camera frames
  (every control tick) and joint state. Prints an auto-connect ?url= view URL.
- runtime/cli.py:
  - _run_robot_interactive: real-time control loop (background thread) with a
    clean chat prompt — a typed command switches task/subtask immediately and
    regenerates. Starts running as soon as a task is set (via --task or the
    picker); otherwise paused until the first command. No flag needed.
  - --rerun (+ --rerun.web_port / --rerun.grpc_port): live camera view; the
    robot obs provider and action executor log frames to rerun.
  - --direct_subtask (general, sim or robot): the typed text is the subtask fed
    to the action expert; the LM subtask generator is disabled.
  - Inference overrides: force compile_model=False and gradient_checkpointing
    =False (torch.compile recompiled on every prompt-length change -> >1min per
    chunk; grad checkpointing only slows the forward pass).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 11:52:09 +02:00
pepijn223 cd15a66286 feat(runtime): RoboCasa sim backend + interactive controls
Drive a persistent RoboCasa kitchen with open-ended prompts and watch it live.

- runtime/sim_robocasa.py: single-scene RoboCasa backend (n_envs=2 for stable
  EGL rendering — single-worker rendering is broken), high-res multi-view
  compositing incl. wrist cam, annotated MP4 + rolling latest.png + MJPEG live
  viewer, and /reset scene re-roll.
- runtime/cli.py: --sim mode with a main-thread control loop (background-thread
  rendering corrupts EGL), clean chat-style prompt (a new command switches the
  task and regenerates the subtask immediately), plus --sim.render_size,
  --sim.views, --sim.stream_port, --sim.direct_subtask and --disable_memory.
- runtime/adapter.py: GenerationConfig.enable_memory / enable_subtask toggles.
- runtime/registry.py + policies/pi05/pi05_adapter.py: register pi05 (flat VLA,
  direct task-text conditioning; no subtask/memory head).
- policies/pi052/inference/pi052_adapter.py: condition the action expert on
  "{subtask}, State: {..}" to match eval/training.
- envs/robocasa.py + envs/configs.py: terminate_on_success + horizon options so
  the interactive kitchen persists across tasks (defaults preserve eval).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 17:28:40 +02:00
Lior Ben Horin e40b58a8df Update GR00T 1.7 LIBERO checkpoints (#3961)
Co-authored-by: Steven Palma <imstevenpmwork@ieee.org>
2026-07-08 13:25:54 +02:00
pepijn 147b8f248d refactor(train): remove EMA support from training pipeline
Drop the opt-in EMA-shadow feature entirely: EMAConfig, the `ema` field on
TrainPipelineConfig, all EMA logic in lerobot_train.py (setup/resume, per-step
update, W&B observability, checkpoint save, EMA-model eval, and the sibling
`<repo_id>-ema` hub push), and the ema-pytorch dependency.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 11:15:33 +00:00
pepijn c80ddfe22c Merge remote-tracking branch 'origin/main' into feat/smolvla-on-steerable
Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	src/lerobot/configs/train.py
#	src/lerobot/datasets/__init__.py
#	src/lerobot/policies/factory.py
#	src/lerobot/policies/groot/groot_n1.py
#	src/lerobot/scripts/lerobot_eval.py
#	src/lerobot/scripts/lerobot_train.py
#	uv.lock
2026-07-08 10:31:40 +00:00
pepijn 18ddf98ab5 feat(pi052): add subtask-only (no-memory) recipe
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-08 10:21:05 +00:00
Mishig 3e538352ca Make doc builds faster (#3958)
* Update doc build workflow: light installs, drop custom container

* Keep the pin comment dependabot-compatible
2026-07-08 07:31:10 +02:00
pepijn cae4a2de43 perf(pi052): gate per-step .item() CUDA syncs to logging steps
Keep PI052Policy.forward's loss components as detached tensors and only
materialize loss/grad_norm/update_s to python floats on logging steps
(1-in-log_freq) via a new update_policy(log_metrics=...) gate. Also dedupe
the predict_actions .any().item() control-flow sync (2 -> 1 per step).

Keeps the training step fully async on non-logging steps so the next batch's
dataloading/enqueue overlaps GPU compute instead of stalling on a per-step
CUDA sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 07:00:42 +00:00
Steven Palma 8a74e0ac6d chore(dependencies): Bump lerobot to 0.6.1 (#3957) 2026-07-06 12:52:39 +02:00
Steven Palma 30da8e687a chore(dependencies): Bump lerobot to 0.6.0 (#3956) v0.6.0 2026-07-06 12:06:51 +02:00