Skip to content

v2.9.2: Bug fixes and doc improvements

Latest

Choose a tag to compare

@araffin araffin released this 26 Oct 09:35
0cdcd20

Warning

Stable-Baselines3 (SB3) v2.9.2 will be the last one supporting Python 3.10 (end of life in October 2026)
We highly recommended you to upgrade to Python >= 3.11.

SB3 Contrib (more algorithms): https://github.com/Stable-Baselines-Team/stable-baselines3-contrib
RL Zoo3 (training framework): https://github.com/DLR-RM/rl-baselines3-zoo
Stable-Baselines Jax (SBX): https://github.com/araffin/sbx

To upgrade:

pip install stable_baselines3 sb3_contrib rl_zoo3 --upgrade

Bug Fixes:

  • Fixed file descriptor leak in SubprocVecEnv.close() by closing parent-side pipes to prevent "too many open files" errors in long-running loops
  • Fixed Pandas deprecation warnings on inplace operations

SB3-Contrib

  • Upgraded to Stable-Baselines3 >= 2.9.2

RL Zoo

  • Set learning_starts to 500 for parking-v0 in TQC hyperparameters to ensure the first episode is finished
  • Fixed "too many open files" issue when doing hyperparameter optimization: the trial environments are now closed in a finally block and gc_after_trial=True is passed to Optuna to free them between trials (also needs latest SB3 master version to fully work)
  • Set use_expln=True for pybullet envs when using gSDE to avoid NaNs
  • Add a note regarding pybullet source installation error on macOS due to legacy code
  • Migrate packaging setup from setup.py to pyproject.toml and integrate requirements.txt as a new extra

SBX (SB3 + Jax)

  • Updated Jax dependency version range

Deprecations:

Others:

  • Fixed moviepy test compatibility with moviepy >= 2.0 (PyTorch doesn't support it yet)
  • Added filter for numpy newshape deprecation warning from torch tensorboard
  • Fixed mypy error in test_vec_envs.py by wrapping itertools.product with list()
  • Improved tests coverage for RMSpropTFLike optimizer (invalid params, centered/momentum/weight_decay branches, pickle roundtrip)
  • Improved test coverage for save_util.py: added tests for BadZipFile error handling in load_from_zip_file and IsADirectoryError/FileNotFoundError handling in open_path
  • Fixed Docker build by adding the missing --system flag to uv pip uninstall opencv-python (required by recent uv)
  • Added a warning when n_steps > 1 is passed together with a custom replay_buffer_class, as n_steps is only applied when the replay buffer class is selected automatically (@Koustav-github)
  • Updated tests dependencies

Documentation:

  • Clarified in the n_steps docstring that it only applies when replay_buffer_class is None, and that a custom replay buffer must be configured with replay_buffer_kwargs={"n_steps": ..., "gamma": ...} (@Koustav-github)
  • Updated algorithm table (added the ones from SBX and sorted the table)
  • Fixed typos, grammar, and Gymnasium API inconsistencies across documentation

New Contributors

Full Changelog: v2.9.0...v2.9.2