Skip to content

Commit

Permalink
Fixes for python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
thatguy11325 committed Jun 21, 2024
1 parent cbc344e commit 95a1c33
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pokemonred_puffer/cleanrl_puffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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: {})
Expand Down
1 change: 0 additions & 1 deletion pokemonred_puffer/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 95a1c33

Please sign in to comment.