Bug fixes, get/set parameters and improved docs
Pre-release
Pre-release
Breaking Changes:
- Removed
device
keyword argument of policies; usepolicy.to(device)
instead. (@qxcv) - Rename
BaseClass.get_torch_variables
->BaseClass._get_torch_save_params
and
BaseClass.excluded_save_params
->BaseClass._excluded_save_params
- Renamed saved items
tensors
topytorch_variables
for clarity make_atari_env
,make_vec_env
andset_random_seed
must be imported with (and not directly fromstable_baselines3.common
):
from stable_baselines3.common.cmd_util import make_atari_env, make_vec_env
from stable_baselines3.common.utils import set_random_seed
New Features:
- Added
unwrap_vec_wrapper()
tocommon.vec_env
to extractVecEnvWrapper
if needed - Added
StopTrainingOnMaxEpisodes
to callback collection (@xicocaio) - Added
device
keyword argument toBaseAlgorithm.load()
(@liorcohen5) - Callbacks have access to rollout collection locals as in SB2. (@partiallytyped)
- Added
get_parameters
andset_parameters
for accessing/setting parameters of the agent - Added actor/critic loss logging for TD3. (@mloo3)
Bug Fixes:
- Fixed a bug where the environment was reset twice when using
evaluate_policy
- Fix logging of
clip_fraction
in PPO (@diditforlulz273) - Fixed a bug where cuda support was wrongly checked when passing the GPU index, e.g.,
device="cuda:0"
(@liorcohen5) - Fixed a bug when the random seed was not properly set on cuda when passing the GPU index
Others:
- Improve typing coverage of the
VecEnv
- Fix type annotation of
make_vec_env
(@ManifoldFR) - Removed
AlreadySteppingError
andNotSteppingError
that were not used - Fixed typos in SAC and TD3
- Reorganized functions for clarity in
BaseClass
(save/load functions close to each other, private
functions at top) - Clarified docstrings on what is saved and loaded to/from files
- Simplified
save_to_zip_file
function by removing duplicate code - Store library version along with the saved models
- DQN loss is now logged
Documentation:
- Added
StopTrainingOnMaxEpisodes
details and example (@xicocaio) - Updated custom policy section (added custom feature extractor example)
- Re-enable
sphinx_autodoc_typehints
- Updated doc style for type hints and remove duplicated type hints