Skip to content

Commit

Permalink
[Bug Fix] Add missing sync_progress call for parallel play
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantuMope committed Sep 18, 2024
1 parent 0283006 commit 7f4d297
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions alf/trainers/policy_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,6 +1120,8 @@ def play(root_dir,
else:
selective_criteria_func = None

# Sync the progress for all environments in case parallel_play > 1
env.sync_progress()
while episodes < num_episodes:
# For parallel play, we cannot naively pick the first finished `num_episodes`
# episodes to estimate the average return (or other statistics) as it can be
Expand Down

0 comments on commit 7f4d297

Please sign in to comment.