A tf.train.ClusterSpec represents the set of processes that participate in a distributed TensorFlow computation. Everytf.distribute.Server is constructed in a particular cluster.
To create a cluster with two jobs and five tasks, you specify the mapping from job names to lists of network addresses (typically hostname-port pairs).
Each job may also be specified as a sparse mapping from task indices to network addresses. This enables a server to be configured without needing to know the identity of (for example) all other worker tasks:
A dictionary mapping one or more job names to (i) a list of network addresses, or (ii) a dictionary mapping integer task indices to network addresses; or a tf.train.ClusterDef protocol buffer.
Raises
TypeError
If cluster is not a dictionary mapping strings to lists of strings, and not a tf.train.ClusterDef protobuf.
Returns a dictionary from job names to their tasks.
For each job, if the task index space is dense, the corresponding value will be a list of network addresses; otherwise it will be a dictionary mapping (sparse) task indices to the corresponding addresses.
Returns
A dictionary mapping job names to lists or dictionaries describing the tasks in those jobs.
Returns a mapping from task ID to address in the given job.
Args
job_name
The string name of a job in this cluster.
Returns
A list of task addresses, where the index in the list corresponds to the task index of each task. The list may containNone if the job was defined with a sparse set of task indices.