From 8cbca61360ef98660f149e3d76762350ce613323 Mon Sep 17 00:00:00 2001 From: helpingstar Date: Thu, 7 Mar 2024 22:02:28 +0900 Subject: [PATCH] Remove duplicate code (#449) --- cleanrl/ppo_atari.py | 3 --- cleanrl/ppo_atari_lstm.py | 3 --- cleanrl/ppo_atari_multigpu.py | 3 --- 3 files changed, 9 deletions(-) diff --git a/cleanrl/ppo_atari.py b/cleanrl/ppo_atari.py index 2277faf93..87c15a23e 100644 --- a/cleanrl/ppo_atari.py +++ b/cleanrl/ppo_atari.py @@ -94,9 +94,6 @@ def thunk(): else: env = gym.make(env_id) env = gym.wrappers.RecordEpisodeStatistics(env) - if capture_video: - if idx == 0: - env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") env = NoopResetEnv(env, noop_max=30) env = MaxAndSkipEnv(env, skip=4) env = EpisodicLifeEnv(env) diff --git a/cleanrl/ppo_atari_lstm.py b/cleanrl/ppo_atari_lstm.py index 0848074ce..154146daf 100644 --- a/cleanrl/ppo_atari_lstm.py +++ b/cleanrl/ppo_atari_lstm.py @@ -94,9 +94,6 @@ def thunk(): else: env = gym.make(env_id) env = gym.wrappers.RecordEpisodeStatistics(env) - if capture_video: - if idx == 0: - env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") env = NoopResetEnv(env, noop_max=30) env = MaxAndSkipEnv(env, skip=4) env = EpisodicLifeEnv(env) diff --git a/cleanrl/ppo_atari_multigpu.py b/cleanrl/ppo_atari_multigpu.py index c8313e2ed..7a37b4ee0 100644 --- a/cleanrl/ppo_atari_multigpu.py +++ b/cleanrl/ppo_atari_multigpu.py @@ -110,9 +110,6 @@ def thunk(): else: env = gym.make(env_id) env = gym.wrappers.RecordEpisodeStatistics(env) - if capture_video: - if idx == 0: - env = gym.wrappers.RecordVideo(env, f"videos/{run_name}") env = NoopResetEnv(env, noop_max=30) env = MaxAndSkipEnv(env, skip=4) env = EpisodicLifeEnv(env)