aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/hadoop
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-17 13:24:29 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-17 13:34:57 -0700
commita768624f1d0ae3629caf5b9784b4b6911b881c18 (patch)
treef7581648c47b4ad95d10099f4485e5f41463f767 /tensorflow/contrib/hadoop
parentd7b4bf68dc80f1abf90bd6b857f079157028a861 (diff)
Move from deprecated self.test_session() to self.cached_session().
self.test_session() has been deprecated in 9962eb5e84b15e309410071b06c2ed2d6148ed44 as its name confuses readers of the test. Moving to cached_session() instead which is more explicit about: * the fact that the session may be reused. * the session is not closed even when doing a "with self.test_session()" statement. PiperOrigin-RevId: 213326581
Diffstat (limited to 'tensorflow/contrib/hadoop')
-rw-r--r--tensorflow/contrib/hadoop/python/kernel_tests/hadoop_test.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/hadoop/python/kernel_tests/hadoop_test.py b/tensorflow/contrib/hadoop/python/kernel_tests/hadoop_test.py
index d796e43d87..f7f1189bb9 100644
--- a/tensorflow/contrib/hadoop/python/kernel_tests/hadoop_test.py
+++ b/tensorflow/contrib/hadoop/python/kernel_tests/hadoop_test.py
@@ -51,7 +51,7 @@ class SequenceFileDatasetTest(test.TestCase):
init_op = iterator.initializer
get_next = iterator.get_next()
- with self.test_session() as sess:
+ with self.cached_session() as sess:
sess.run(init_op)
for _ in range(num_repeats): # Dataset is repeated.
for i in range(25): # 25 records.