Fix AsyncCheckpointSaverHook info logging if listeners is None.
PiperOrigin-RevId: 286237503 Change-Id: Ib77a42b8f22f142d15ef6f42135852a3c8188d53
This commit is contained in:
parent
c52c5293b0
commit
bff34fdf13
@ -65,8 +65,10 @@ class AsyncCheckpointSaverHook(basic_session_run_hooks.CheckpointSaverHook):
|
||||
ValueError: At most one of `saver` or `scaffold` should be set.
|
||||
"""
|
||||
save_path = os.path.join(checkpoint_dir, checkpoint_basename)
|
||||
logging.info("Create AsyncCheckpointSaverHook saving to path\n%s\n"
|
||||
"with %d listener(s).", save_path, len(listeners))
|
||||
logging.info("Create AsyncCheckpointSaverHook saving to path\n%s",
|
||||
save_path)
|
||||
if listeners:
|
||||
logging.info(" with %d listener(s).", len(listeners))
|
||||
if saver is not None and scaffold is not None:
|
||||
raise ValueError("You cannot provide both saver and scaffold.")
|
||||
self._saver = saver
|
||||
|
Loading…
Reference in New Issue
Block a user