diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-10-30 07:12:07 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-10-30 07:18:35 -0700 |
commit | 2e54fd6de78d84af6b26f537ee25c5a625adce3b (patch) | |
tree | 76d3a58c6c0200f24ce576989a782d547e51eb50 /tensorflow/python/training/queue_runner_impl.py | |
parent | 32ab30cb0a6bc86a6423c9078cfdddac79d79451 (diff) |
Adds eager execution compatibility note in Readers, Queues, and QueueRunner.
Raises a RuntimeError in base classes for QueueBase, ReaderBase, and QueueRunner.
PiperOrigin-RevId: 173888425
Diffstat (limited to 'tensorflow/python/training/queue_runner_impl.py')
-rw-r--r-- | tensorflow/python/training/queue_runner_impl.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tensorflow/python/training/queue_runner_impl.py b/tensorflow/python/training/queue_runner_impl.py index d3b473ee46..4e7c81d7b2 100644 --- a/tensorflow/python/training/queue_runner_impl.py +++ b/tensorflow/python/training/queue_runner_impl.py @@ -44,6 +44,11 @@ class QueueRunner(object): and reporting exceptions, etc. The `QueueRunner`, combined with the `Coordinator`, helps handle these issues. + + @compatibility(eager) + QueueRunners are not compatible with eager execution. Instead, please + use `tf.data` to get data into your model. + @end_compatibility """ def __init__(self, queue=None, enqueue_ops=None, close_op=None, @@ -80,7 +85,13 @@ class QueueRunner(object): ValueError: If both `queue_runner_def` and `queue` are both specified. ValueError: If `queue` or `enqueue_ops` are not provided when not restoring from `queue_runner_def`. + RuntimeError: If eager execution is enabled. """ + if context.in_eager_mode(): + raise RuntimeError( + "QueueRunners are not supported when eager execution is enabled. " + "Instead, please use tf.data to get data into your model.") + if queue_runner_def: if queue or enqueue_ops: raise ValueError("queue_runner_def and queue are mutually exclusive.") |