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
| Option | Description | Default |
|---|---|---|
-e/--env ENV | ID of the environment (for logdir naming + specs) | REQUIRED |
--algo ALGO | Imitation Learning algorithm | REQUIRED |
--dataset PATH | Path 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 error | REQUIRED |
--num_epochs N | Number of training epochs | algo default |
--normalize_actions | Normalize actions in the dataset | False |
--logdir/--logs | Path to logging directory | SRB_LOGS_DIR |
Supported Algorithms
Offline learning is backed by robomimic. Algorithm names are prefixed robomimic_:
| Algorithm | Description |
|---|---|
robomimic_bc | Vanilla Behavioral Cloning (MLP policy) |
robomimic_bc_rnn | Behavioral Cloning with RNN policy |
robomimic_bc_transformer | Behavioral Cloning with Transformer policy |
robomimic_bcq | Batch-Constrained Q-Learning |
robomimic_cql | Conservative Q-Learning |
robomimic_iql | Implicit Q-Learning |
robomimic_td3_bc | TD3 with BC regularization |
robomimic_gl | Goal-conditioned Learning |
robomimic_hbc | Hierarchical Behavioral Cloning |
robomimic_iris | IRIS (latent skill discovery) |
robomimic_diffusion_policy | Diffusion 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
srb agent collect— collect the demonstrations this command consumessrb model— inspect, validate, and publish model artifacts- Imitation Learning Workflow
- Imitation Learning Integration