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 f95bbf3 commit d6ccf83
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 @@ -1117,6 +1117,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 statitics) as it can be
Expand Down

0 comments on commit d6ccf83

Please sign in to comment.