Minor improved log statements for CheckpointSaverHook.
PiperOrigin-RevId: 292692483 Change-Id: I07ab95f6e99e45f45e4cadba28926d4ebe44cb53
This commit is contained in:
parent
24fd250d73
commit
073460df14
@ -610,18 +610,20 @@ class CheckpointSaverHook(session_run_hook.SessionRunHook):
|
||||
|
||||
def _save(self, session, step):
|
||||
"""Saves the latest checkpoint, returns should_stop."""
|
||||
logging.info("Saving checkpoints for %d into %s.", step, self._save_path)
|
||||
|
||||
logging.info("Calling checkpoint listeners before saving checkpoint %d...",
|
||||
step)
|
||||
for l in self._listeners:
|
||||
l.before_save(session, step)
|
||||
|
||||
logging.info("Saving checkpoints for %d into %s.", step, self._save_path)
|
||||
self._get_saver().save(session, self._save_path, global_step=step,
|
||||
write_meta_graph=self._save_graph_def)
|
||||
self._summary_writer.add_session_log(
|
||||
SessionLog(
|
||||
status=SessionLog.CHECKPOINT, checkpoint_path=self._save_path),
|
||||
step)
|
||||
|
||||
logging.info("Calling checkpoint listeners after saving checkpoint %d...",
|
||||
step)
|
||||
should_stop = False
|
||||
for l in self._listeners:
|
||||
if l.after_save(session, step):
|
||||
|
Loading…
Reference in New Issue
Block a user