[tf.data] Make error message more informative.
PiperOrigin-RevId: 361352108 Change-Id: Ib4ffb578da274df1accb615f7fe1c04bd58b321d
This commit is contained in:
parent
051a96f3ec
commit
99b1fa6a15
@ -56,7 +56,9 @@ class OptionsBase(object):
|
||||
def __setattr__(self, name, value):
|
||||
if not self._mutable:
|
||||
raise ValueError("Mutating `tf.data.Options()` returned by "
|
||||
"`tf.data.Dataset.options()` has no effect.")
|
||||
"`tf.data.Dataset.options()` has no effect. Use "
|
||||
"`tf.data.Dataset.with_options(options)` to set or "
|
||||
"update dataset options.")
|
||||
if hasattr(self, name):
|
||||
object.__setattr__(self, name, value)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user