aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/rpc
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-20 17:06:41 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-20 17:16:54 -0700
commit9962eb5e84b15e309410071b06c2ed2d6148ed44 (patch)
tree01dbe9a94f5ef80ad36d9019e934346daed88b81 /tensorflow/contrib/rpc
parenta4404f6158a5489f4cf8769b2d7ec1b336f37cc7 (diff)
Deprecate test_session() and introduce instead session() and cached_session().
Implicitly, test_session(graph=None,...) will by default cache the session and thus the object will not be deleted if used in a with statement: with self.test_session(): # Some code # Some other code where by default we would expect that the session is closed by now. The fact that the session is not closed when we exit the with scope has caused surprise to users and created hard to diagnose bugs. To keep backward compatibility, we are deprecating this function and introducing a new one called cached_session that will by default always cache the session (even when graph is not None) and a new function where session will always be closed. Note that the behavior of test_session has slightly changed as it will always set the graph and session as global default (with as_default). The documentation of test_session has also changed as the documentation was not matching the previous behavior of test_session. PiperOrigin-RevId: 209511997
Diffstat (limited to 'tensorflow/contrib/rpc')
0 files changed, 0 insertions, 0 deletions