aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cluster_resolver
diff options
context:
space:
mode:
authorGravatar Frank Chen <frankchn@google.com>2017-08-02 13:55:06 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-02 14:02:50 -0700
commit0bca5cf3e0356c0f687cf70e650055b631aa7015 (patch)
treeba7b00e1c7330e05248a0526aec9713fe8de5ac6 /tensorflow/contrib/cluster_resolver
parent27e7c8fecef4b046f11558019c0d5105d447a4da (diff)
The return type of the response in the the Google Cloud TPU APIs is a dict rather than an object, so we need to use dict-syntax to access it.
PiperOrigin-RevId: 164033254
Diffstat (limited to 'tensorflow/contrib/cluster_resolver')
-rw-r--r--tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py b/tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py
index 2edf3b599a..444557cfcc 100644
--- a/tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py
+++ b/tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver.py
@@ -99,7 +99,7 @@ class TPUClusterResolver(ClusterResolver):
request = self._service.projects().locations().nodes().get(name=full_name)
response = request.execute()
- instance_url = '%s:%s' % (response.ipAddress, response.port)
+ instance_url = '%s:%s' % (response['ipAddress'], response['port'])
worker_list.append(instance_url)
return ClusterSpec({self._job_name: worker_list})