File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ New Features:
26
26
Bug Fixes:
27
27
^^^^^^^^^^
28
28
- Fixed Atari wrapper that missed the reset condition (@luizapozzobon)
29
+ - Fixed PPO train/n_updates metric not accounting for early stopping (@adamfrly)
29
30
30
31
Deprecations:
31
32
^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -189,7 +189,6 @@ def train(self) -> None:
189
189
clip_fractions = []
190
190
191
191
continue_training = True
192
-
193
192
# train for n_epochs epochs
194
193
for epoch in range (self .n_epochs ):
195
194
approx_kl_divs = []
@@ -271,10 +270,10 @@ def train(self) -> None:
271
270
th .nn .utils .clip_grad_norm_ (self .policy .parameters (), self .max_grad_norm )
272
271
self .policy .optimizer .step ()
273
272
273
+ self ._n_updates += 1
274
274
if not continue_training :
275
275
break
276
276
277
- self ._n_updates += self .n_epochs
278
277
explained_var = explained_variance (self .rollout_buffer .values .flatten (), self .rollout_buffer .returns .flatten ())
279
278
280
279
# Logs
You can’t perform that action at this time.
0 commit comments