diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 4fa9043c8..203f15e3a 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -33,11 +33,23 @@ Others: Bug Fixes: ^^^^^^^^^^ +Documentation: +^^^^^^^^^^^^^^ + +Release 2.3.2 (2024-04-27) +-------------------------- + +Bug Fixes: +^^^^^^^^^^ +- Reverted ``torch.load()`` to be called ``weights_only=False`` as it caused loading issue with old version of PyTorch. + + Documentation: ^^^^^^^^^^^^^^ - Added ER-MRL to the project page (@corentinlger) - Updated Tensorboard Logging Videos documentation (@NickLucche) + Release 2.3.1 (2024-04-22) -------------------------- @@ -55,6 +67,11 @@ Release 2.3.0 (2024-03-31) **New defaults hyperparameters for DDPG, TD3 and DQN** +.. warning:: + + Because of ``weights_only=True``, this release breaks loading of policies when using PyTorch 1.13. + Please upgrade to PyTorch >= 2.0 or upgrade SB3 version (we reverted the change in SB3 2.3.2) + Breaking Changes: ^^^^^^^^^^^^^^^^^ diff --git a/stable_baselines3/common/save_util.py b/stable_baselines3/common/save_util.py index 2d8652006..a85c9c2ec 100644 --- a/stable_baselines3/common/save_util.py +++ b/stable_baselines3/common/save_util.py @@ -447,7 +447,8 @@ def load_from_zip_file( file_content.seek(0) # Load the parameters with the right ``map_location``. # Remove ".pth" ending with splitext - th_object = th.load(file_content, map_location=device, weights_only=True) + # Note(antonin): we cannot use weights_only=True, as it breaks with PyTorch 1.13, see GH#1911 + th_object = th.load(file_content, map_location=device, weights_only=False) # "tensors.pth" was renamed "pytorch_variables.pth" in v0.9.0, see PR #138 if file_path == "pytorch_variables.pth" or file_path == "tensors.pth": # PyTorch variables (not state_dicts) diff --git a/stable_baselines3/version.txt b/stable_baselines3/version.txt index e96f44fb3..f90b1afc0 100644 --- a/stable_baselines3/version.txt +++ b/stable_baselines3/version.txt @@ -1 +1 @@ -2.4.0a0 +2.3.2