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

The srb agent learn command trains a policy offline from a demonstration dataset produced by srb agent collect. Unlike the other agent subcommands, this one runs without Isaac Sim — it operates purely on the recorded dataset and therefore has a lighter footprint and faster startup.

Usage

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

Options

OptionDescriptionDefault
-e/--env ENVID of the environment (for logdir naming + specs)REQUIRED
--algo ALGOImitation Learning algorithmREQUIRED
--dataset PATHPath to the demonstration dataset (HDF5). Required in practice — when omitted, auto-discovery only searches the new run’s own (empty) log directory and the run fails with a missing-dataset errorREQUIRED
--num_epochs NNumber of training epochsalgo default
--normalize_actionsNormalize actions in the datasetFalse
--logdir/--logsPath to logging directorySRB_LOGS_DIR

Supported Algorithms

Offline learning is backed by robomimic. Algorithm names are prefixed 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 training metrics are written under ${SRB_LOGS_DIR}/<env_id>/<algo>/<timestamp>/. The resulting policy can be evaluated 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 completed offline-learning run as an SRB model artifact. The --dataset path is used as training-data provenance unless overridden with the model-artifact dataset options.

See Also