aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-10 18:06:59 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-10 18:11:40 -0700
commit7624e8e9336e9b9f9a066292b11cf75f8fdeea05 (patch)
treefa28c9414b858ef1ee41f68ada38468d2cf278d4
parentbdd6d2ebb6364939a89d49750c64bd10793c3cd9 (diff)
To add an arg 'name' to Experiment.evaluate() in order to distinguish multiple 'one-pass' evaluations.
PiperOrigin-RevId: 161470441
-rw-r--r--tensorflow/contrib/learn/python/learn/experiment.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/contrib/learn/python/learn/experiment.py b/tensorflow/contrib/learn/python/learn/experiment.py
index cd47b82d82..3b6399c7e6 100644
--- a/tensorflow/contrib/learn/python/learn/experiment.py
+++ b/tensorflow/contrib/learn/python/learn/experiment.py
@@ -274,7 +274,7 @@ class Experiment(object):
max_steps=self._train_steps,
hooks=self._train_monitors + extra_hooks)
- def evaluate(self, delay_secs=None):
+ def evaluate(self, delay_secs=None, name=None):
"""Evaluate on the evaluation data.
Runs evaluation on the evaluation data and returns the result. Runs for
@@ -286,6 +286,8 @@ class Experiment(object):
Args:
delay_secs: Start evaluating after this many seconds. If `None`, defaults
to using `self._eval_delays_secs`.
+ name: Gives the name to the evauation for the case multiple evaluation is
+ run for the same experiment.
Returns:
The result of the `evaluate` call to the `Estimator`.
@@ -300,7 +302,7 @@ class Experiment(object):
return self._call_evaluate(input_fn=self._eval_input_fn,
steps=self._eval_steps,
metrics=self._eval_metrics,
- name="one_pass",
+ name=(name or "one_pass"),
hooks=self._eval_hooks)
@deprecated(