aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Shanqing Cai <cais@google.com>2016-05-31 03:14:01 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-31 04:17:02 -0700
commit37c823ab19da688eb5e9b4aa6d75d7859632414c (patch)
tree671b48182e0bdca974e09631b7af2a90ab3265d5
parent9aedaf2b011d90b0e325c738723de2ac3509b9e1 (diff)
Reduce computation load in metric_ops_test to prevent timeout
The test methods named "testWithMultipleUpdates" in test classes "StreamingAUCTest and "StreamingPrecisionRecallThresholdsTest" previously used a large number of samples (5000), which lead to repeated test timeouts in non-copt builds in TensorFlow's OSS Jenkins. For example, see: http://ci.tensorflow.org/view/Nightly/job/nightly-matrix-cpu/TF_BUILD_CONTAINER_TYPE=CPU,TF_BUILD_IS_OPT=NO_OPT,TF_BUILD_IS_PIP=NO_PIP,TF_BUILD_PYTHON_VERSION=PYTHON2,label=cpu-slave/111/console Our Jenkins slaves are known to be substantially slower than the internal build machines. This CL reduces the compute load in these two test methods. The average non-copt test time of metric_ops_test Without this CL: ~175 s With this CL: ~54 s Change: 123628402
-rw-r--r--tensorflow/contrib/metrics/python/ops/metric_ops_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py
index 97712cd2bc..d0e5c0bb98 100644
--- a/tensorflow/contrib/metrics/python/ops/metric_ops_test.py
+++ b/tensorflow/contrib/metrics/python/ops/metric_ops_test.py
@@ -665,7 +665,7 @@ class StreamingAUCTest(tf.test.TestCase):
return np.sum(tp[labels == 0] / num_negatives)
def testWithMultipleUpdates(self):
- num_samples = 5000
+ num_samples = 1000
batch_size = 10
num_batches = int(num_samples / batch_size)
@@ -904,7 +904,7 @@ class StreamingPrecisionRecallThresholdsTest(tf.test.TestCase):
self.assertAlmostEqual(0, rec.eval(), 6)
def testWithMultipleUpdates(self):
- num_samples = 5000
+ num_samples = 1000
batch_size = 10
num_batches = num_samples / batch_size