[tune] save error msg, cleanup after object checkpoints

This commit is contained in:
Eric Liang
2018-01-29 18:48:45 -08:00
committed by GitHub
parent 0b022c0973
commit 35b1d6189b
9 changed files with 49 additions and 29 deletions
+2 -2
View File
@@ -147,8 +147,8 @@ class _MockAgent(Agent):
episode_reward_mean=10, episode_len_mean=10,
timesteps_this_iter=10, info={})
def _save(self):
path = os.path.join(self.logdir, "mock_agent.pkl")
def _save(self, checkpoint_dir):
path = os.path.join(checkpoint_dir, "mock_agent.pkl")
with open(path, 'wb') as f:
pickle.dump(self.info, f)
return path