Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 27c4362

Browse files
committed
first try a new checkpoint before checking the time elapsed
Fix for the case when evaluating one checkpoint takes longer than creating a new checkpoint.
1 parent a655d49 commit 27c4362

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tensor2tensor/bin/t2t-bleu

+3-1
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ def main(_):
166166
while True:
167167
if not models and FLAGS.wait_secs:
168168
tf.logging.info('All checkpoints evaluated. Waiting till %s if a new checkpoint appears' % time.asctime(time.localtime(exit_time)))
169-
while not models and time.time() < exit_time:
169+
while True:
170170
time.sleep(10)
171171
models = read_checkpoints_list(model_dir, min_steps)
172+
if models or time.time() > exit_time:
173+
break
172174
if not models:
173175
return
174176

0 commit comments

Comments
 (0)