diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 84ec850..ae9ffcd 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -22,6 +22,7 @@ Bug Fixes: ^^^^^^^^^^ - Moves VectorizedActionNoise into ``_setup_learn()`` in OffPolicyAlgorithm (@PatrickHelm) - Prevents out of bound error on Windows if no seed is passed (@PatrickHelm) +- Calls ``callback.update_locals()`` before ``callback.on_rollout_end()`` in OnPolicyAlgorithm (@PatrickHelm) Deprecations: ^^^^^^^^^^^^^ diff --git a/stable_baselines3/common/on_policy_algorithm.py b/stable_baselines3/common/on_policy_algorithm.py index 87e1929..f038df6 100644 --- a/stable_baselines3/common/on_policy_algorithm.py +++ b/stable_baselines3/common/on_policy_algorithm.py @@ -221,6 +221,8 @@ class OnPolicyAlgorithm(BaseAlgorithm): rollout_buffer.compute_returns_and_advantage(last_values=values, dones=dones) + callback.update_locals(locals()) + callback.on_rollout_end() return True