Skip to content

Commit

Permalink
fix(pu): fix total_episode_count bug in collector
Browse files Browse the repository at this point in the history
  • Loading branch information
puyuan1996 committed Mar 30, 2024
1 parent 5fc7c45 commit 52ba3f9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lzero/worker/muzero_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ def collect(self,

self._env_info[env_id]['time'] += self._timer.value + interaction_duration
if timestep.done:
self._total_episode_count += 1
reward = timestep.info['eval_episode_return']
info = {
'reward': reward,
Expand Down Expand Up @@ -686,7 +685,7 @@ def collect(self,
collected_episode = allreduce_data(collected_episode, 'sum')
collected_duration = allreduce_data(collected_duration, 'sum')
self._total_envstep_count += collected_step
# self._total_episode_count += collected_episode
self._total_episode_count += collected_episode
self._total_duration += collected_duration

# log
Expand Down

0 comments on commit 52ba3f9

Please sign in to comment.