Skip to content
Snippets Groups Projects
Commit 6d76d42f authored by JasonJiazhiZhang's avatar JasonJiazhiZhang Committed by Oleksandr
Browse files

Fix vector env deletion (#185)

Explicitly call close for vector env to avoid issues with file writer prematurely close buffer when tensorboard enabled. See #184 for more info.
parent 04368cdc
No related branches found
No related tags found
No related merge requests found
......@@ -341,6 +341,8 @@ class PPOTrainer(BaseRLTrainer):
self.save_checkpoint(f"ckpt.{count_checkpoints}.pth")
count_checkpoints += 1
self.envs.close()
def _eval_checkpoint(
self,
checkpoint_path: str,
......@@ -554,3 +556,5 @@ class PPOTrainer(BaseRLTrainer):
{"average success": episode_success_mean},
checkpoint_index,
)
self.envs.close()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment