Skip to content

Commit 84163b4

Browse files
authored
Fixes update_locals() in collect_rollouts() of OnPolicyAlgorithm (#1660)
* calls update_locals() before on_rollout_end() * update changelog
1 parent c99d65c commit 84163b4

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/misc/changelog.rst

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Bug Fixes:
2222
^^^^^^^^^^
2323
- Moves VectorizedActionNoise into ``_setup_learn()`` in OffPolicyAlgorithm (@PatrickHelm)
2424
- Prevents out of bound error on Windows if no seed is passed (@PatrickHelm)
25+
- Calls ``callback.update_locals()`` before ``callback.on_rollout_end()`` in OnPolicyAlgorithm (@PatrickHelm)
2526

2627
Deprecations:
2728
^^^^^^^^^^^^^

stable_baselines3/common/on_policy_algorithm.py

+2
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,8 @@ def collect_rollouts(
221221

222222
rollout_buffer.compute_returns_and_advantage(last_values=values, dones=dones)
223223

224+
callback.update_locals(locals())
225+
224226
callback.on_rollout_end()
225227

226228
return True

0 commit comments

Comments
 (0)