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 learn — Learn from Demonstrations

Train offline from a dataset produced by srb agent collect. It runs without Isaac Sim.

Usage

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

Options

OptionDescriptionDefault
-e/--env/--task ENVEnvironment ID for log directory and specsREQUIRED
--cfg PATHHydra YAML override; DEFAULT uses environment defaults, IGNORE/NONE/NULL disable itDEFAULT
--algo ALGOImitation Learning algorithmREQUIRED
--dataset PATHHDF5 dataset; if omitted, searches the new run directory and errors if none is foundNone
--num_epochs NNumber of training epochsalgo default
--normalize_actionsNormalize actions in the datasetFalse
--logdir/--logsRoot directory for learning run outputsSRB_LOGS_DIR

Dataset admission and normalization

Training reads a verified private HDF5 copy. Saved configuration records the source path but does not archive the dataset.

Admission rejects inconsistent sample counts or terminal flags and filters that select no demos. Native configs may select custom action keys.

--normalize_actions preserves the source and records ranges in normalization_params.txt; constant-action and no-action inputs produce none.

Supported Algorithms

Offline learning uses robomimic; names start with robomimic_:

AlgorithmDescription
robomimic_bcVanilla Behavioral Cloning (MLP policy)
robomimic_bc_rnnBehavioral Cloning with RNN policy
robomimic_bc_transformerBehavioral Cloning with Transformer policy
robomimic_bcqBatch-Constrained Q-Learning
robomimic_cqlConservative Q-Learning
robomimic_iqlImplicit Q-Learning
robomimic_td3_bcTD3 with BC regularization
robomimic_glGoal-conditioned Learning
robomimic_hbcHierarchical Behavioral Cloning
robomimic_irisIRIS (latent skill discovery)
robomimic_diffusion_policyDiffusion Policy

See the Robomimic documentation for algorithm details and hyperparameters.

Examples

Train a Behavioral Cloning policy on a dataset collected for peg_in_hole:

srb agent learn --algo robomimic_bc --env peg_in_hole \
  --dataset logs/peg_in_hole/collect/<run>/datasets/demos_<timestamp>.hdf5

Train on a specific dataset path with an explicit epoch budget:

srb agent learn --algo robomimic_bc_rnn --env peg_in_hole \
  --dataset /path/to/demos.hdf5 --num_epochs 500

Output

Checkpoints and metrics go to <logdir>/<env_id>/<algo>/<timestamp>/; <logdir> is --logdir/--logs or SRB_LOGS_DIR. Evaluate the policy with:

srb agent eval --algo robomimic_bc --env peg_in_hole

or rolled out to produce additional demonstrations with:

srb agent collect --algo robomimic_bc --env peg_in_hole --num_episodes 200

Pass --model-artifact-output OUT to package the run as an SRB model artifact. The --dataset path supplies training-data provenance unless model-artifact dataset options override it.

See Also