diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-21 00:02:49 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-21 00:07:39 -0700 |
commit | 2952f5134905af795ba90ae1eb97e39091ba9843 (patch) | |
tree | f73bc5cd0342d9449114bd933863c2aa55610aa2 /tensorflow/python/profiler | |
parent | cf047f7755f3400ee128db2571042091fe9f8314 (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: 213944355
Diffstat (limited to 'tensorflow/python/profiler')
-rw-r--r-- | tensorflow/python/profiler/pprof_profiler_test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/python/profiler/pprof_profiler_test.py b/tensorflow/python/profiler/pprof_profiler_test.py index c2469f012d..11a3487360 100644 --- a/tensorflow/python/profiler/pprof_profiler_test.py +++ b/tensorflow/python/profiler/pprof_profiler_test.py @@ -141,7 +141,7 @@ comment: 9 run_metadata = config_pb2.RunMetadata() num_iters = 5 - with self.test_session() as sess: + with self.cached_session() as sess: i = constant_op.constant(0) c = lambda i: math_ops.less(i, num_iters) b = lambda i: math_ops.add(i, 1) |