1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00

Fixes for having NumpySharedRunningStats syncing on multi-node (#139)

1. Having the standard checkpoint prefix in order for the data store to grab it, and sync it to S3.
2. Removing the reference to Redis so that it won't try to pickle that in.
3. Enable restoring a checkpoint into a single-worker run, which was saved by a single-node-multiple-worker run.
This commit is contained in:
Gal Leibovich
2018-11-23 16:11:47 +02:00
committed by GitHub
parent 87a7848b0a
commit a1c56edd98
12 changed files with 154 additions and 99 deletions

View File

@@ -248,12 +248,13 @@ class LevelManager(EnvironmentInterface):
return env_response_for_upper_level
def save_checkpoint(self, checkpoint_id: int) -> None:
def save_checkpoint(self, checkpoint_prefix: str) -> None:
"""
Save checkpoints of the networks of all agents
:param: checkpoint_prefix: The prefix of the checkpoint file to save
:return: None
"""
[agent.save_checkpoint(checkpoint_id) for agent in self.agents.values()]
[agent.save_checkpoint(checkpoint_prefix) for agent in self.agents.values()]
def restore_checkpoint(self, checkpoint_dir: str) -> None:
"""