aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/data
diff options
context:
space:
mode:
authorGravatar Jiri Simsa <jsimsa@google.com>2018-10-03 11:09:44 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-10-03 11:14:11 -0700
commit51b266fba181dffb6b3f9207280cde6b7670dd90 (patch)
tree3e61eb7e52c2fdc9dc5cb3902933a7599c6ce08a /tensorflow/python/data
parent55ea7f89ee6aa45c5a7623ac9ba671044467e807 (diff)
[tf.data] Fix noisy warning.
PiperOrigin-RevId: 215592456
Diffstat (limited to 'tensorflow/python/data')
-rw-r--r--tensorflow/python/data/ops/dataset_ops.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/python/data/ops/dataset_ops.py b/tensorflow/python/data/ops/dataset_ops.py
index 46ce191f7b..3693cc88f2 100644
--- a/tensorflow/python/data/ops/dataset_ops.py
+++ b/tensorflow/python/data/ops/dataset_ops.py
@@ -1830,10 +1830,11 @@ class StructuredFunctionWrapper(object):
component = _NestedDatasetComponent(t)
flat_classes.append(component)
flat_shapes.append(component)
- flat_types.append(component)
- if t.options() is not None: # pylint: disable=protected-access
- warnings.warn("Encountered a nested dataset with options. These "
- "options will not be applied to the outer dataset.")
+ flat_types.append(component)
+ if t.options() != Options(): # pylint: disable=protected-access
+ warnings.warn("Encountered a nested dataset with non-default "
+ "options. These options will not be propagated to "
+ "the outer dataset.")
else:
try:
t = ops.convert_to_tensor(t)