From 4c8fffeceb50db17f1e45015d319e18ebad4f09c Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Fri, 21 Jun 2024 14:19:44 -0400 Subject: [PATCH] log artifact --- pokemonred_puffer/cleanrl_puffer.py | 2 +- pokemonred_puffer/wrappers/stream_wrapper.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pokemonred_puffer/cleanrl_puffer.py b/pokemonred_puffer/cleanrl_puffer.py index 31438e7..e6ac5cc 100644 --- a/pokemonred_puffer/cleanrl_puffer.py +++ b/pokemonred_puffer/cleanrl_puffer.py @@ -487,7 +487,7 @@ def close(self): artifact = wandb.Artifact(artifact_name, type="model") model_path = self.save_checkpoint() artifact.add_file(model_path) - self.wandb_client.run.log_artifact(artifact) + self.wandb_client.log_artifact(artifact) self.wandb_client.finish() def save_checkpoint(self): diff --git a/pokemonred_puffer/wrappers/stream_wrapper.py b/pokemonred_puffer/wrappers/stream_wrapper.py index 06c6ee9..91626a5 100644 --- a/pokemonred_puffer/wrappers/stream_wrapper.py +++ b/pokemonred_puffer/wrappers/stream_wrapper.py @@ -32,6 +32,7 @@ def __init__(self, env: RedGymEnv, config: pufferlib.namespace): def __del__(self): try: + self.loop.run_until_complete() for task in asyncio.all_tasks(): task.cancel() self.loop.close()