Skip to content

Commit

Permalink
Default disable including the coordinator in the TPU job (#18073)
Browse files Browse the repository at this point in the history
* Default disable including the coordinator in the TPU job

* Fix the test
  • Loading branch information
jhseu authored and rmlarsen committed Mar 29, 2018
1 parent 93cf42a commit 481dca1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self,
zone=None,
project=None,
job_name='worker',
coordinator_name='coordinator',
coordinator_name=None,
coordinator_address=None,
credentials='default',
service=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def testRetrieveProjectAndZoneFromMetadata(self):
zone=None,
tpu=['test-tpu-1'],
credentials=None,
service=self.mock_service_client(tpu_map=tpu_map))
service=self.mock_service_client(tpu_map=tpu_map),
coordinator_name='coordinator')

actual_cluster_spec = tpu_cluster_resolver.cluster_spec()
expected_proto = """
Expand Down Expand Up @@ -170,6 +171,7 @@ def testSimpleSuccessfulRetrieval(self):
project='test-project',
zone='us-central1-c',
tpu=['test-tpu-1'],
coordinator_name='coordinator',
coordinator_address='10.128.1.5:10203',
credentials=None,
service=self.mock_service_client(tpu_map=tpu_map))
Expand All @@ -196,6 +198,7 @@ def testNewNetworkEndpointFormat(self):
project='test-project',
zone='us-central1-c',
tpu='test-tpu-1',
coordinator_name='coordinator',
coordinator_address='10.128.1.5:10203',
credentials=None,
service=self.mock_service_client(tpu_map=tpu_map))
Expand Down Expand Up @@ -239,7 +242,8 @@ def testPodResolution(self):
tpu_cluster_resolver = TPUClusterResolver(
tpu='test-tpu-1',
credentials=None,
service=self.mock_service_client(tpu_map=tpu_map))
service=self.mock_service_client(tpu_map=tpu_map),
coordinator_name='coordinator')

actual_cluster_spec = tpu_cluster_resolver.cluster_spec()
expected_proto = """
Expand Down

0 comments on commit 481dca1

Please sign in to comment.