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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user