cluster_spec = { 'worker': ['worker1.example.com:2222', 'worker2.example.com:2222'] } os.environ['TF_CONFIG'] = json.dumps({ 'cluster': cluster_spec, 'task': {'type': 'worker', 'index': 0} }) strategy = tf.distribute.MultiWorkerMirroredStrategy() __ __