Check if the session has been deleted before releasing a callable.
authorDerek Murray <mrry@google.com>
Thu, 12 Apr 2018 22:20:18 +0000 (15:20 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 12 Apr 2018 22:22:37 +0000 (15:22 -0700)
commitfffbe5a26da2d6fab5a3eb648cefef49db4d38de
treeac8356cf89355d018d3a54ca0611722af4090cbf
parent0161bb77accc64d3742098feb7f438752a83ff32
Check if the session has been deleted before releasing a callable.

In some versions of Python, the Session._session field may be cleared
(in `Session.__del__()`) before a callable that has a reference to
that Session is deleted. Add a defensive check in the
`Session._Callable.__del__()` method.

PiperOrigin-RevId: 192679796
tensorflow/python/client/session.py