class_docstr: Represents options for `tf.data.Dataset`.
  
  A `tf.data.Options` object can be, for instance, used to control which static
  optimizations to apply to the input pipeline graph or whether to use
  performance modeling to dynamically tune the parallelism of operations such as
  `tf.data.Dataset.map` or `tf.data.Dataset.interleave`.
  
  The options are set for the entire dataset and are carried over to datasets
  created through tf.data transformations.
  
  The options can be set by constructing an `Options` object and using the
  `tf.data.Dataset.with_options(options)` transformation, which returns a
  dataset with the options set.
  
  >>> dataset = tf.data.Dataset.range(42)
  >>> options = tf.data.Options()
  >>> options.deterministic = False
  >>> dataset = dataset.with_options(options)
  >>> print(dataset.options().deterministic)
  False
  
  Note: A known limitation of the `tf.data.Options` implementation is that the
  options are not preserved across tf.function boundaries. In particular, to
  set options for a dataset that is iterated within a tf.function, the options
  need to be set within the same tf.function.
class_docstr_tok: ["Represents","options","for","`","tf.data.Dataset","`",".","A","`","tf.data.Options","`","object","can","be",",","for","instance",",","used","to","control","which","static","optimizations","to","apply","to","the","input","pipeline","graph","or","whether","to","use","performance","modeling","to","dynamically","tune","the","parallelism","of","operations","such","as","`","tf.data.Dataset.map","`","or","`","tf.data.Dataset.interleave","`",".","The","options","are","set","for","the","entire","dataset","and","are","carried","over","to","datasets","created","through","tf.data","transformations",".","The","options","can","be","set","by","constructing","an","`","Options","`","object","and","using","the","`","tf.data.Dataset.with_options","(","options",")","`","transformation",",","which","returns","a","dataset","with","the","options","set",".",">",">",">","dataset","=","tf.data.Dataset.range","(","42",")",">",">",">","options","=","tf.data.Options","(",")",">",">",">","options.deterministic","=","False",">",">",">","dataset","=","dataset.with_options","(","options",")",">",">",">","print","(","dataset.options","(",")",".deterministic",")","False","Note",":","A","known","limitation","of","the","`","tf.data.Options","`","implementation","is","that","the","options","are","not","preserved","across","tf.function","boundaries",".","In","particular",",","to","set","options","for","a","dataset","that","is","iterated","within","a","tf.function",",","the","options","need","to","be","set","within","the","same","tf.function","."]
code: def _from_proto(self, pb):
      if pb.WhichOneof("optional_deterministic") is not None:
          self.deterministic = pb.deterministic
      self.autotune._from_proto(
          pb.autotune_options
      )  # pylint: disable=protected-access
      self.experimental_distribute._from_proto(
          pb.distribute_options
      )  # pylint: disable=protected-access
      if pb.WhichOneof("optional_external_state_policy") is not None:
          self.experimental_external_state_policy = ExternalStatePolicy._from_proto(  # pylint: disable=protected-access
              pb.external_state_policy
          )
      self.experimental_optimization._from_proto(
          pb.optimization_options
      )  # pylint: disable=protected-access
      if pb.WhichOneof("optional_slack") is not None:
          self.experimental_slack = pb.slack
      if pb.WhichOneof("optional_symbolic_checkpoint") is not None:
          self.experimental_symbolic_checkpoint = pb.symbolic_checkpoint
      if pb.WhichOneof("optional_warm_start") is not None:
          self.experimental_warm_start = pb.warm_start
      self.threading._from_proto(pb.threading_options)
  
imports: import enum
  import platform
  from absl import logging
  from tensorflow.core.framework import dataset_options_pb2
  from tensorflow.core.framework import model_pb2
  from tensorflow.python.data.ops import test_mode
  from tensorflow.python.data.util import options
  from tensorflow.python.util import deprecation
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 4 for calling the Options obj's underlying member method code with example usage: obj._from_proto(pb) without return types