aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/kinesis
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-09-21 00:07:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-21 00:13:08 -0700
commitb19d6657070bbf1df5706195a0bf3a92cbf371fc (patch)
tree64279a06acd61c7028226eba46a05dd1127acee4 /tensorflow/contrib/kinesis
parent2952f5134905af795ba90ae1eb97e39091ba9843 (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: 213944932
Diffstat (limited to 'tensorflow/contrib/kinesis')
-rw-r--r--tensorflow/contrib/kinesis/python/kernel_tests/kinesis_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/contrib/kinesis/python/kernel_tests/kinesis_test.py b/tensorflow/contrib/kinesis/python/kernel_tests/kinesis_test.py
index 7289b45c50..bf89922318 100644
--- a/tensorflow/contrib/kinesis/python/kernel_tests/kinesis_test.py
+++ b/tensorflow/contrib/kinesis/python/kernel_tests/kinesis_test.py
@@ -64,7 +64,7 @@ class KinesisDatasetTest(test.TestCase):
init_batch_op = iterator.make_initializer(batch_dataset)
get_next = iterator.get_next()
- with self.test_session() as sess:
+ with self.cached_session() as sess:
# Basic test: read from shard 0 of stream 1.
sess.run(init_op, feed_dict={stream: stream_name, num_epochs: 1})
for i in range(10):
@@ -108,7 +108,7 @@ class KinesisDatasetTest(test.TestCase):
get_next = iterator.get_next()
data = list()
- with self.test_session() as sess:
+ with self.cached_session() as sess:
# Basic test: read from shard 0 of stream 2.
sess.run(
init_op, feed_dict={