diff options
author | Shanqing Cai <cais@google.com> | 2017-10-27 13:39:08 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-10-27 13:42:25 -0700 |
commit | 0bc432a443e70bcd38326291f9746f965ffd1de2 (patch) | |
tree | d82014880fe21585d0e9d222dd724b0eab676b63 /tensorflow/python/training/queue_runner_impl.py | |
parent | b31b08bb0f876db76ae3beb0b0801ab1893f9abf (diff) |
TFE: Add compatibility errors and doc strings to queues, input pipelines and Supervisor
PiperOrigin-RevId: 173712330
Diffstat (limited to 'tensorflow/python/training/queue_runner_impl.py')
-rw-r--r-- | tensorflow/python/training/queue_runner_impl.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tensorflow/python/training/queue_runner_impl.py b/tensorflow/python/training/queue_runner_impl.py index 5abc6a2f58..d3b473ee46 100644 --- a/tensorflow/python/training/queue_runner_impl.py +++ b/tensorflow/python/training/queue_runner_impl.py @@ -23,6 +23,7 @@ import weakref from tensorflow.core.protobuf import queue_runner_pb2 from tensorflow.python.client import session +from tensorflow.python.eager import context from tensorflow.python.framework import errors from tensorflow.python.framework import ops from tensorflow.python.platform import tf_logging as logging @@ -414,7 +415,18 @@ def start_queue_runners(sess=None, coord=None, daemon=True, start=True, Returns: A list of threads. + + Raises: + RuntimeError: If called with eager execution enabled. + ValueError: If called without a default `tf.Session` registered. + + @compatibility(eager) + Not compatible with eager execution. To ingest data under eager execution, + use the `tf.data` API instead. + @end_compatibility """ + if context.in_eager_mode(): + raise RuntimeError("Queues are not compatible with eager execution.") if sess is None: sess = ops.get_default_session() if not sess: |