class_docstr: Grappler Clusters.
class_docstr_tok: ["Grappler","Clusters","."]
docstr: Creates a Cluster.
  
  Args:
    allow_soft_placement: If True, TF will automatically fix illegal
      placements instead of erroring out if the placement isn't legal.
    disable_detailed_stats: If True, detailed statistics will not be
      available.
    disable_timeline: If True, the timeline information will not be reported.
    devices: A list of devices of type device_properties_pb2.NamedDevice.
      If None, a device list will be created based on the spec of
      the local machine.
docstr_tok: ["Creates","a","Cluster",".","Args",":","allow_soft_placement",":","If","True",",","TF","will","automatically","fix","illegal","placements","instead","of","erroring","out","if","the","placement","is","n't","legal",".","disable_detailed_stats",":","If","True",",","detailed","statistics","will","not","be","available",".","disable_timeline",":","If","True",",","the","timeline","information","will","not","be","reported",".","devices",":","A","list","of","devices","of","type","device_properties_pb2.NamedDevice",".","If","None",",","a","device","list","will","be","created","based","on","the","spec","of","the","local","machine","."]
code: def __init__(
      self,
      allow_soft_placement=True,
      disable_detailed_stats=True,
      disable_timeline=True,
      devices=None,
  ):
      """Creates a Cluster.
  
      Args:
        allow_soft_placement: If True, TF will automatically fix illegal
          placements instead of erroring out if the placement isn't legal.
        disable_detailed_stats: If True, detailed statistics will not be
          available.
        disable_timeline: If True, the timeline information will not be reported.
        devices: A list of devices of type device_properties_pb2.NamedDevice.
          If None, a device list will be created based on the spec of
          the local machine.
      """
      self._tf_cluster = None
      self._generate_timeline = not disable_timeline
  
      if devices is None:
          self._tf_cluster = tf_cluster.TF_NewCluster(
              allow_soft_placement, disable_detailed_stats
          )
      else:
          devices_serialized = [
              device.SerializeToString() for device in devices
          ]
          self._tf_cluster = tf_cluster.TF_NewVirtualCluster(
              devices_serialized
          )
  
file_path: tensorflow-upstream/tensorflow/python/grappler/cluster.py
imports: import contextlib
  from tensorflow.core.framework import step_stats_pb2
  from tensorflow.core.grappler.costs import op_performance_data_pb2
  from tensorflow.core.protobuf import device_properties_pb2
  from tensorflow.python.grappler import _pywrap_tf_cluster
label_desc: Use image node_id 1 to create a new Cluster object from inherited base classes: object with example: obj = Cluster(allow_soft_placement, disable_detailed_stats, disable_timeline, devices)