Commit 3ec02be2 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'eval' into 'master'

Account for cases when checkpoint gets deleted before it's evaluated.

See merge request !67
parents de83fd72 07ffcf09
Pipeline #23467 passed with stages
in 25 minutes and 26 seconds
...@@ -215,13 +215,17 @@ def eval(estimator, eval_input_fn, hooks, run_once, eval_interval_secs, name, ...@@ -215,13 +215,17 @@ def eval(estimator, eval_input_fn, hooks, run_once, eval_interval_secs, name,
continue continue
# Evaluate # Evaluate
evaluations = estimator.evaluate( try:
input_fn=eval_input_fn, evaluations = estimator.evaluate(
steps=None, input_fn=eval_input_fn,
hooks=hooks, steps=None,
checkpoint_path=checkpoint_path, hooks=hooks,
name=name, checkpoint_path=checkpoint_path,
) name=name,
)
# if the model gets deleted before we can evaluate it
except tf.errors.NotFoundError:
break
str_evaluations = append_evaluated_file(evaluated_file, str_evaluations = append_evaluated_file(evaluated_file,
evaluations) evaluations)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment