Stable Baselines 3
How to integrate W&B with Stable Baseline 3.
2 minute read
Stable Baselines 3 (SB3) is a set of reliable implementations of reinforcement learning algorithms in PyTorch. W&B’s SB3 integration:
- 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 gradient histograms.
Review an example of a SB3 training run with W&B.
Log your SB3 experiments

WandbCallback Arguments
Argument | Usage |
---|---|
verbose |
The verbosity of sb3 output |
model_save_path |
Path to the folder where the model will be saved, The default value is `None` so the model is not logged |
model_save_freq |
Frequency to save the model |
gradient_save_freq |
Frequency to log gradient. The default value is 0 so the gradients are not logged |
Basic Example
The W&B SB3 integration uses the logs output from TensorBoard to log your metrics
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.