Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

srb agent train — Train Agent

The srb agent train command trains a Reinforcement Learning (RL) agent against a registered SRB environment using one of the integrated RL frameworks (dreamer, tdmpc2, sb3_*, sbx_*, rsl_rl_ppo, skrl_*).

Usage

srb agent train --algo ALGO --env ENV_ID [options]

Options | Shared Agent Options

OptionDescriptionDefault
--algo ALGORL algorithm to use (only RL algorithms are accepted)REQUIRED
--obs {state,visual}Observation modality: selects the agent-config variant and splits the log tree (<algo> vs <algo>-visual) so state/visual checkpoints never cross-load. visual requires the Phase-2 sensor profiles and errors helpfully until they exist.state
--continue_training/--continueContinue training from the latest checkpoint of the most recent run (framework-dependent; TD-MPC2 rejects it)False
--model PATHContinue training from a specific checkpoint (framework-dependent; for TD-MPC2 a weights-only import)unset

Note: --continue_training and --model are mutually exclusive. To resume the most recent run pass --continue_training; to resume from an arbitrary checkpoint pass --model PATH (framework-dependent — see below).

Note: what “continue” means is framework-dependent. Upstream TD-MPC2 serializes model weights only, so SRB treats --model there as a weights import: the optimizers, replay buffer, schedules, and step counter all restart from an explicitly logged step 0, and --continue_training fails immediately as unsupported rather than pretending to resume a training state that was never saved.

Supported Algorithm Families

The parser accepts registered RL algorithm names such as dreamer, tdmpc2, sbx_ppo, sb3_ppo, rsl_rl_ppo, and skrl_ppo.

Examples

# Fresh run on the landing environment with 512 parallel envs
srb agent train --algo sbx_ppo --env landing env.num_envs=512 --hide_ui

# Continue the latest run on the same env/algo combination
srb agent train --algo sbx_ppo --env landing --continue_training

# Resume from an arbitrary checkpoint
srb agent train --algo sbx_ppo --env landing \
  --model space_robotics_bench/logs/landing/sbx_ppo/<run>/ckpt/<ckpt>

Model Artifacts

Training can package the completed run into a portable SRB model artifact by passing --model-artifact-output OUT. Add --model-artifact-dataset DATASET to record training-data provenance, or use srb model from-run after training for the same packaging workflow.

See the Reinforcement Learning Workflow for an end-to-end walkthrough including hyper-parameter overrides via Hydra and Weights & Biases logging.