|TensorFlow 1 version||View source on GitHub|
Connects to the given cluster.
tf.config.experimental_connect_to_cluster( cluster_spec_or_resolver, job_name='localhost', task_index=0, protocol=None, make_master_device_default=True )
Used in the guide:
Will make devices on the cluster available to use. Note that calling this more than once will work, but will invalidate any tensor handles on the old remote devices.
If the given local job name is not present in the cluster specification, it will be automatically added, using an unused port on the localhost.
ClusterResolverdescribing the cluster.
job_name: The name of the local job.
task_index: The local task index.
protocol: The communication protocol, such as
"grpc". If unspecified, will use the default from
make_master_device_default: If True and a cluster resolver is passed, will automatically enter the master task device scope, which indicates the master becomes the default device to run ops. It won't do anything if a cluster spec is passed. Will throw an error if the caller is currently already in some device scope.