diff --git a/pokemonred_puffer/cleanrl_puffer.py b/pokemonred_puffer/cleanrl_puffer.py index 77c9421..3582fea 100644 --- a/pokemonred_puffer/cleanrl_puffer.py +++ b/pokemonred_puffer/cleanrl_puffer.py @@ -129,9 +129,9 @@ class CleanPuffeRL: env_send_queues: list[Queue] env_recv_queues: list[Queue] wandb_client: wandb.wandb_sdk.wandb_run.Run | None = None - profile: Profile = Profile() - losses: Losses = Losses() - utilization: Utilization = Utilization() + profile: Profile = field(default_factory=lambda: Profile()) + losses: Losses = field(default_factory=lambda: Losses()) + utilization: Utilization = field(default_factory=lambda: Utilization()) global_step: int = 0 epoch: int = 0 stats: dict = field(default_factory=lambda: {}) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index a98564f..5b2c2d8 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -584,7 +584,6 @@ def run_action_on_emulator(self, action): # TODO: Add video saving logic if not self.disable_ai_actions: - self.pyboy.button() self.pyboy.send_input(VALID_ACTIONS[action]) self.pyboy.send_input(VALID_RELEASE_ACTIONS[action], delay=8) self.pyboy.tick(self.action_freq, render=True)