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

Fix cmd line arguments handling (#68)

* refactoring the merging of the task parameters and the command line parameters
* removing some unused command line arguments
* fix for saving checkpoints when not passing through coach.py
This commit is contained in:
Itai Caspi
2018-11-07 15:47:02 +02:00
committed by GitHub
parent 93571306c3
commit e7a91b4dc3
4 changed files with 53 additions and 50 deletions

View File

@@ -100,6 +100,8 @@ class GraphManager(object):
self.preset_validation_params = PresetValidationParameters()
self.reset_required = False
# timers
self.graph_creation_time = None
self.last_checkpoint_saving_time = time.time()
# counters
@@ -520,6 +522,8 @@ class GraphManager(object):
self.save_checkpoint()
def save_checkpoint(self):
if self.task_parameters.checkpoint_save_dir is None:
self.task_parameters.checkpoint_save_dir = os.path.join(self.task_parameters.experiment_path, 'checkpoint')
checkpoint_path = os.path.join(self.task_parameters.checkpoint_save_dir,
"{}_Step-{}.ckpt".format(
self.checkpoint_id,