executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
policy-training-inferenceSelect, configure, train, evaluate, and safely plan inference for LeRobot policies, processors, devices, checkpoints, and optional PEFT adapters.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task names lerobot-train, lerobot-eval,
lerobot-rollout, a policy type or checkpoint, policy processors, CUDA/device
selection, PEFT, or rollout inference. This sub-skill covers model-side
configuration and safe command planning. Route dataset format, episode schema,
features, and statistics acquisition to dataset-workflows; route physical
robot/teleoperator operation and data collection to
robot-control-data-collection; route simulator installation, environment
configuration, and RL to simulation-and-rl.
cuda device must be checked with torch.cuda.is_available()
and the intended policy/dependencies must be importable.local_files_only for offline validation. Hub
identifiers may trigger downloads when the real command runs; ask before that.Collect: LeRobot version, policy type or checkpoint, dataset/environment handoff, feature keys/shapes, normalization statistics source, device/backend and VRAM, training or evaluation budget, output directory, resume source, optional PEFT settings, credentials/Hub consent, and whether real hardware is involved.
Produce one of:
Record unknown feature/stat/processor provenance as an unresolved validation item, not as a successful compatibility claim.
act for a small/single-task baseline. Consider
diffusion for action-distribution experiments; smolvla, pi0, pi05,
pi0_fast, or other VLA policies only when the language/vision checkpoint,
tokenizer, memory, and GPU budget are known. See
model-overview.md.diffusion, pi, smolvla, groot,
wallx, xvla, peft, or training. Missing dependencies must be fixed by
the smallest relevant extra, not all by default.make_policy_config(type, ...) and obtain input/output features from
dataset metadata or an environment. For a checkpoint, load its
config.json through PreTrainedConfig.from_pretrained; preserve its type
and processor contract unless a deliberate override is validated.make_policy requires exactly one of
dataset metadata or environment config. It infers action outputs and missing
input features, validates visual consistency, places the model on
config.device, and loads safetensors for a normal checkpoint. Build the
matching pre/post pipelines with make_pre_post_processors; for a checkpoint
load the saved policy_preprocessor.json and policy_postprocessor.json.step_through or transform_features to locate a
processor mismatch.steps small, no Hub push,
W&B disabled, fixed output directory). Then choose checkpoint frequency,
evaluation split/episodes, workers, accumulation, mixed precision, and output
policy. Do not reuse a non-empty output directory unless resume=true.lerobot-rollout is considered runnable.lerobot-train uses dotted draccus fields: --dataset.repo_id,
--policy.type, --policy.device, --batch_size, --steps,
--output_dir, --save_freq, --eval_steps, --parallelism.*,
--accelerator.*, --peft.*, and --resume/--config_path.--policy.path=<local-dir-or-hub-id> in the
current CLI contract. For a resume, use --resume=true --config_path=<checkpoint train_config.json, pretrained_model directory, or permitted Hub run source>.
Do not confuse fine-tuning from --policy.path with restoring optimizer/RNG/
sampler state via --resume.lerobot-eval needs --policy.path, --env.type, and bounded
--eval.n_episodes; --eval.batch_size=1 is the conservative first check.
Recording is off unless explicitly enabled. Hub environments additionally
require --trust_remote_code=true consent.lerobot-rollout is the deployment engine. strategy.type=base does not
record and must not receive a dataset; sentry/highlight/dagger/episodic need
the appropriate recording dataset, and dagger needs a teleoperator. sync
works for all policies; rtc is for supported slow chunking policies and
requires policy-specific queue/horizon validation.TrainPipelineConfig.validate() requires a policy or reward model, disallows
an existing output directory for a fresh run, applies the policy optimizer and
scheduler presets by default, and requires a nonzero dataset eval_split when
eval_steps > 0. A normal checkpoint contains a policy config and
model.safetensors; processor JSON/state files must accompany it for faithful
inference. Training checkpoints also contain train_config.json and training
state. Safetensors is the compatible default; DCP model artifacts require a
sharded run. Sharded training currently rejects PEFT, fp16, in-training env
rollouts, reward-model training, multiple optimizers, compile/activation
checkpointing placeholders, and context parallelism greater than one.
PreTrainedPolicy.from_pretrained puts the policy in eval mode; call
train() only for training. The base contract requires get_optim_params,
reset, forward, predict_action_chunk, and select_action. forward
returns (loss, logging_dict_or_none); inference calls reset() at episode
start and select_action() after preprocessing. Keep logging values native and
avoid passing gradient-bearing tensors into logs.
python -m ... --help/CLI help succeeds in the target environment.check_policy_environment.py reports the registered choice, optional package
status, policy class import, requested device, CUDA availability, and any
import failure without claiming execution readiness when a gate is missing.config.json, weights, and matching pre/postprocessor
files; revision and local-only policy are explicit.rename_map is
used only when the checkpoint contract requires it, and normalization stats
are from the intended dataset or an explicitly approved override.blocked, not ready.