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
| Option | Description | Default |
|---|---|---|
-e/--env/--task ENV | Environment ID for log directory and specs | REQUIRED |
--cfg PATH | Hydra YAML override; DEFAULT uses environment defaults, IGNORE/NONE/NULL disable it | DEFAULT |
--algo ALGO | Imitation Learning algorithm | REQUIRED |
--dataset PATH | HDF5 dataset; if omitted, searches the new run directory and errors if none is found | None |
--num_epochs N | Number of training epochs | algo default |
--normalize_actions | Normalize actions in the dataset | False |
--logdir/--logs | Root directory for learning run outputs | SRB_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_:
| 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 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
srb agent collect— collect the demonstrations this command consumessrb model— inspect, validate, and publish model artifacts- Imitation Learning Workflow
- Imitation Learning Integration