From e5363400d396dbc723298357d5ad7ef3b129a5f7 Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Sat, 13 Apr 2024 23:24:34 -0400 Subject: [PATCH] Better logging --- pokemonred_puffer/cleanrl_puffer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pokemonred_puffer/cleanrl_puffer.py b/pokemonred_puffer/cleanrl_puffer.py index b807492..50e895b 100644 --- a/pokemonred_puffer/cleanrl_puffer.py +++ b/pokemonred_puffer/cleanrl_puffer.py @@ -381,9 +381,11 @@ def evaluate(self): for i in range(self.config.num_envs) ] # Do this with + because f-strings are tricky. Can do nested f-string in a later python. - print( - f"Migrating states: {','.join(str(i) + '->' + str(n) for i, n in enumerate(reset_states))}" - ) + print("Migrating states:") + for i, n in enumerate(reset_states): + print( + f"\t {i} -> {n}, event scores: {self.infos["learner"]["reward/event"][i]} -> {self.infos["learner"]["reward/event"][n]}" + ) for i in range(self.config.num_envs): self.env_recv_queues[i].put(self.infos["learner"]["state"][reset_states[i]]) for i in range(self.config.num_envs):