aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-01-26 17:07:27 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-26 17:22:54 -0800
commita511cb646cb641376c3857d719cfd46741b40319 (patch)
tree8df3fc9b281c3d42546e29da69cc3c40fdb23744
parenta99712b6229a39d6c6a6e0bb60b8ff6934216017 (diff)
Fix opensource_build test breakage, use six.itervalues instead of dict.values.
Change: 145741427
-rw-r--r--tensorflow/contrib/learn/python/learn/metric_spec.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/contrib/learn/python/learn/metric_spec.py b/tensorflow/contrib/learn/python/learn/metric_spec.py
index 1c404903e5..95964c7e97 100644
--- a/tensorflow/contrib/learn/python/learn/metric_spec.py
+++ b/tensorflow/contrib/learn/python/learn/metric_spec.py
@@ -204,9 +204,9 @@ class MetricSpec(object):
raise ValueError('MetricSpec without specified ' + name + '_key'
' requires ' + name + 's tensor or single element'
' dict, got %s' % dict_or_tensor)
- return dict_or_tensor.values()[0]
- else:
- return dict_or_tensor
+ _, tensor = dict_or_tensor.popitem()
+ return tensor
+ return dict_or_tensor
# Get the predictions
prediction = _get_dict('prediction', predictions, self.prediction_key)