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

add redis options to training worker

This commit is contained in:
Zach Dwiel
2018-09-19 11:13:20 -04:00
committed by zach dwiel
parent 04f32a0f02
commit 13d81f65b9
2 changed files with 15 additions and 12 deletions

View File

@@ -511,7 +511,7 @@ class GraphManager(object):
):
self.save_checkpoint()
def _log_save_checkpoint(self):
def save_checkpoint(self):
checkpoint_path = os.path.join(self.task_parameters.save_checkpoint_dir,
"{}_Step-{}.ckpt".format(
self.checkpoint_id,
@@ -521,6 +521,9 @@ class GraphManager(object):
else:
saved_checkpoint_path = checkpoint_path
# this is required in order for agents to save additional information like a DND for example
[manager.save_checkpoint(self.checkpoint_id) for manager in self.level_managers]
screen.log_dict(
OrderedDict([
("Saving in path", saved_checkpoint_path),
@@ -528,12 +531,6 @@ class GraphManager(object):
prefix="Checkpoint"
)
def save_checkpoint(self):
# this is required in order for agents to save additional information like a DND for example
[manager.save_checkpoint(self.checkpoint_id) for manager in self.level_managers]
self._log_save_checkpoint()
self.checkpoint_id += 1
self.last_checkpoint_saving_time = time.time()