From a511cb646cb641376c3857d719cfd46741b40319 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 26 Jan 2017 17:07:27 -0800 Subject: Fix opensource_build test breakage, use six.itervalues instead of dict.values. Change: 145741427 --- tensorflow/contrib/learn/python/learn/metric_spec.py | 6 +++--- 1 file 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) -- cgit v1.2.3