Skip to content

Commit

Permalink
fix epoch/episode iteration bug in mbpo.py (facebookresearch#160)
Browse files Browse the repository at this point in the history
* fix epoch/episode iteration bug in mbpo.py

* fixed trailing whitespace

Co-authored-by: Matthias <ga26qen@mytum.de>
  • Loading branch information
matthiaskiller and Matthias authored Nov 9, 2022
1 parent 25cffd5 commit f90a297
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mbrl/algorithms/mbpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def train(
obs, done = None, False
for steps_epoch in range(cfg.overrides.epoch_length):
if steps_epoch == 0 or done:
steps_epoch = 0
obs, done = env.reset(), False
# --- Doing env step and adding to model dataset ---
next_obs, reward, done, _ = mbrl.util.common.step_env_and_add_to_buffer(
Expand Down

0 comments on commit f90a297

Please sign in to comment.