Skip to content

Commit

Permalink
Update cleanrl/ppo_atari_accelerate.py
Browse files Browse the repository at this point in the history
Co-authored-by: Costa Huang <[email protected]>
  • Loading branch information
edbeeching and vwxyzjn authored Feb 13, 2024
1 parent 9a8451e commit ba8fbd8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cleanrl/ppo_atari_accelerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ def get_action_and_value(self, x, action=None):
rewards[step] = torch.tensor(reward).to(device).view(-1)
next_obs, next_done = torch.Tensor(next_obs).to(device), torch.Tensor(next_done).to(device)


if "final_info" in infos and accelerator.is_main_process:
if not writer:
continue

if "final_info" in infos:
for info in infos["final_info"]:
if info and "episode" in info:
print(f"global_step={global_step}, episodic_return={info['episode']['r']}")
Expand Down

0 comments on commit ba8fbd8

Please sign in to comment.