- Records metrics such as losses and episodic returns.
- Uploads videos of agents playing the games.
- Saves the trained model.
- Logs the model’s hyperparameters.
- Logs the model’s gradient histograms.
Log your SB3 experiments
To log SB3 training to W&B, passWandbCallback to your model’s learn method:

WandbCallback arguments
The following table describes the arguments you can pass to WandbCallback:
| Argument | Usage |
|---|---|
verbose | The verbosity of SB3 output. |
model_save_path | Path to the folder where the model is saved. The default is None, so the model isn’t logged. |
model_save_freq | Frequency to save the model. |
gradient_save_freq | Frequency to log gradients. The default is 0, so gradients aren’t logged. |