/external/tensorflow/tensorflow/python/distribute/ |
D | multi_worker_util_test.py | 35 cluster_spec = { 41 cluster_spec, multi_worker_util.normalize_cluster_spec(cluster_spec)) 63 cluster_spec = server_lib.ClusterSpec({ 69 cluster_spec, multi_worker_util.normalize_cluster_spec(cluster_spec)) 72 cluster_spec = ["127.0.0.1:8964", "127.0.0.1:2333"] 78 multi_worker_util.normalize_cluster_spec(cluster_spec) 84 cluster_spec = { 89 self.assertTrue(multi_worker_util.is_chief(cluster_spec, "chief", 0)) 90 self.assertFalse(multi_worker_util.is_chief(cluster_spec, "worker", 0)) 93 cluster_spec = {"worker": ["127.0.0.1:8964", "127.0.0.1:2333"]} [all …]
|
D | multi_worker_util.py | 26 def normalize_cluster_spec(cluster_spec): argument 40 if isinstance(cluster_spec, (dict, cluster_pb2.ClusterDef)): 41 return server_lib.ClusterSpec(cluster_spec) 42 elif not isinstance(cluster_spec, server_lib.ClusterSpec): 46 return cluster_spec 49 def task_count(cluster_spec, task_type): argument 51 return cluster_spec.num_tasks(task_type) 56 def _validate_cluster_spec(cluster_spec, argument 83 cluster_spec = normalize_cluster_spec(cluster_spec) 85 if any([job not in allowed_task_types for job in cluster_spec.jobs]): [all …]
|
D | distribute_coordinator.py | 95 def _get_num_workers(cluster_spec): argument 97 if not cluster_spec: 99 return len(cluster_spec.as_dict().get(_TaskType.WORKER, [])) + len( 100 cluster_spec.as_dict().get(_TaskType.CHIEF, [])) 114 cluster_spec, argument 138 self._cluster_spec = cluster_spec 145 self._num_workers = _get_num_workers(cluster_spec) 281 def cluster_spec(self): member in _WorkerContext 328 cluster_spec, argument 345 strategy.configure(session_config, cluster_spec, task_type, task_id) [all …]
|
D | estimator_training.py | 40 def _count_ps(cluster_spec): argument 42 if not cluster_spec: 46 return len(cluster_spec.as_dict().get(PS, [])) 49 def _count_worker(cluster_spec, chief_task_type): argument 51 if not cluster_spec: 55 return (len(cluster_spec.as_dict().get(WORKER, [])) + len( 56 cluster_spec.as_dict().get(chief_task_type, []))) 59 def _get_global_id(cluster_spec, task_type, task_id, chief_task_type): argument 68 if chief_task_type in cluster_spec.jobs: 71 t for t in sorted(cluster_spec.jobs) if t != chief_task_type and t != PS [all …]
|
D | distribute_coordinator_test.py | 110 cluster_spec=None, argument 130 if (cluster_spec and task_type and task_id is not None and 205 cluster_spec = {} 207 cluster_spec[CHIEF] = ["localhost:%s" % portpicker.pick_unused_port()] 209 cluster_spec[WORKER] = [ 214 cluster_spec[PS] = [ 218 cluster_spec[EVALUATOR] = ["localhost:%s" % portpicker.pick_unused_port()] 219 return cluster_spec 258 cluster_spec, **kwargs): argument 260 for task_type in cluster_spec.keys(): [all …]
|
D | parameter_server_strategy_v2.py | 441 "with cluster_spec: %s", cluster_resolver.cluster_spec()) 453 cluster_spec = self._cluster_resolver.cluster_spec() 454 self._num_workers = len(cluster_spec.as_dict().get("worker", ())) 455 self._num_ps = len(cluster_spec.as_dict().get("ps", ())) 473 self.__class__.__name__, cluster_spec) 475 cluster_spec, 486 if not cluster_resolver.cluster_spec(): 492 cluster_spec = cluster_resolver.cluster_spec() 496 cluster_spec, 500 if multi_worker_util.task_count(cluster_spec, "ps") < 1: [all …]
|
D | multi_worker_test_base.py | 224 self._cluster_spec = cluster_resolver.cluster_spec().as_dict() 232 cluster_spec = cluster_resolver.cluster_spec() 239 'task_id = %r, rpc_layer = %r', cluster_spec, task_type, task_id, 252 cluster_spec, 358 cluster_spec = create_cluster_spec( 366 server_lib.ClusterSpec(cluster_spec), rpc_layer=rpc_layer)) 421 cluster_spec = {} 423 cluster_spec['chief'] = ['localhost:%s' % pick_unused_port()] 425 cluster_spec['worker'] = [ 429 cluster_spec['ps'] = [ [all …]
|
D | multi_worker_test_base_test.py | 35 self._cluster.cluster_resolver.cluster_spec(), protocol="grpc") 74 cluster_spec = self._cluster.cluster_resolver.cluster_spec().as_dict() 76 self.assertEqual(len(cluster_spec["worker"]), 2) 77 self.assertEqual(len(cluster_spec["ps"]), 1) 78 self.assertEqual(len(cluster_spec["chief"]), 1)
|
D | multi_process_runner.py | 127 cluster_spec, argument 189 assert cluster_spec is not None 190 if 'chief' in cluster_spec and len(cluster_spec['chief']) > 1: 193 .format(len(cluster_spec['chief']))) 205 self._cluster_spec = cluster_spec 267 cluster_spec=None, argument 280 cluster_spec=cluster_spec or self._cluster_spec, 406 cluster_spec=None, argument 440 cluster_spec=cluster_spec, 736 _set_tf_config(test_env.task_type, test_env.task_id, test_env.cluster_spec, [all …]
|
D | parameter_server_strategy.py | 184 if cluster_resolver and cluster_resolver.cluster_spec(): 215 cluster_spec = cluster_resolver.cluster_spec() 221 cluster_spec = multi_worker_util.normalize_cluster_spec(cluster_spec) 222 assert cluster_spec.as_dict() 248 num_ps_replicas = len(cluster_spec.as_dict().get("ps", [])) 255 cluster=cluster_spec) 267 self._is_chief = multi_worker_util.is_chief(cluster_spec, task_type, 269 self._cluster_spec = cluster_spec 277 "variable_device = %r", cluster_spec.as_dict(), task_type, task_id, 596 cluster_spec=None, argument [all …]
|
/external/tensorflow/tensorflow/python/distribute/cluster_resolver/ |
D | cluster_resolver_test.py | 36 def cluster_spec(self): member in MockBaseClusterResolver 127 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 128 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 130 expected_proto, server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 133 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 136 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 153 actual_cluster_spec = union_resolver.cluster_spec() 275 cluster_spec = union_cluster.cluster_spec() 284 self._verifyClusterSpecEquality(cluster_spec, expected_proto) 332 cluster_spec = union_cluster.cluster_spec() [all …]
|
D | slurm_cluster_resolver_test.py | 52 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 53 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 56 server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 59 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 62 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 75 actual_cluster_spec = slurm_cluster_resolver.cluster_spec() 106 actual_cluster_spec = slurm_cluster_resolver.cluster_spec() 160 actual_cluster_spec = slurm_cluster_resolver.cluster_spec() 187 actual_cluster_spec = slurm_cluster_resolver.cluster_spec() 218 actual_cluster_spec = slurm_cluster_resolver.cluster_spec()
|
D | kubernetes_cluster_resolver_test.py | 53 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 64 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 67 server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 70 cluster_spec.as_cluster_def()).as_cluster_def()) 73 cluster_spec.as_dict()).as_cluster_def()) 82 actual_cluster_spec = cluster_resolver.cluster_spec() 101 actual_cluster_spec = cluster_resolver.cluster_spec() 138 cluster_resolver.cluster_spec() 164 actual_cluster_spec = cluster_resolver.cluster_spec()
|
D | tfconfig_cluster_resolver.py | 153 def cluster_spec(self): member in TFConfigClusterResolver 191 cluster_spec = self.cluster_spec() 192 if (not cluster_spec.jobs or 193 (len(cluster_spec.jobs) == 1 and 194 len(cluster_spec.job_tasks(cluster_spec.jobs[0])) == 1)): 203 return format_master_url(cluster_spec.task_address(task_type, task_id),
|
D | sagemaker_cluster_resolver.py | 160 def cluster_spec(self): member in SageMakerClusterResolver 197 cluster_spec = self.cluster_spec() 198 if (not cluster_spec.jobs or 199 (len(cluster_spec.jobs) == 1 and 200 len(cluster_spec.job_tasks(cluster_spec.jobs[0])) == 1)): 210 cluster_spec.task_address(task_type, task_id), rpc_layer)
|
D | gce_cluster_resolver_test.py | 32 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 33 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 35 expected_proto, server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 38 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 41 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 132 actual_cluster_spec = gce_cluster_resolver.cluster_spec() 222 actual_cluster_spec = gce_cluster_resolver.cluster_spec() 243 actual_cluster_spec = gce_cluster_resolver.cluster_spec() 300 actual_cluster_spec = union_cluster_resolver.cluster_spec()
|
D | sagemaker_cluster_resolver_test.py | 34 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 35 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 38 server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 41 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 44 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 55 actual_cluster_spec = cluster_resolver.cluster_spec()
|
D | tfconfig_cluster_resolver_test.py | 37 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 38 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 40 expected_proto, server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 43 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 46 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 70 actual_cluster_spec = cluster_resolver.cluster_spec()
|
/external/tensorflow/tensorflow/python/training/ |
D | server_lib_test.py | 410 cluster_spec = server_lib.ClusterSpec(cluster_def) 411 self.assertProtoEquals(cluster_def, cluster_spec.as_cluster_def()) 429 cluster_spec = server_lib.ClusterSpec(cluster_def) 430 self.assertProtoEquals(cluster_def, cluster_spec.as_cluster_def()) 452 cluster_spec = server_lib.ClusterSpec(cluster_def) 453 self.assertProtoEquals(cluster_def, cluster_spec.as_cluster_def()) 477 cluster_spec = server_lib.ClusterSpec(cluster_def) 478 self.assertProtoEquals(cluster_def, cluster_spec.as_cluster_def()) 484 cluster_spec = server_lib.ClusterSpec({ 492 self.assertEqual(expected_str, str(cluster_spec)) [all …]
|
/external/tensorflow/tensorflow/python/eager/ |
D | remote.py | 74 cluster_spec = server_lib.ClusterSpec( 77 connect_to_cluster(cluster_spec) 143 cluster_spec = cluster_spec_or_resolver 148 cluster_spec = cluster_spec_or_resolver.cluster_spec() 154 cluster_def = copy.deepcopy(cluster_spec.as_cluster_def()) 164 if job_name not in cluster_spec.jobs: 191 for job_name in cluster_spec.jobs: 192 for task_id in cluster_spec.task_indices(job_name): 193 task_address = cluster_spec.task_address(job_name, task_id)
|
/external/tensorflow/tensorflow/python/distribute/cluster_resolver/tpu/ |
D | tpu_cluster_resolver.py | 257 cluster_spec = self.cluster_spec() 260 master = cluster_spec.task_address(task_type, task_id) 263 master = cluster_spec.task_address(self.task_type, self.task_id) 266 job_tasks = cluster_spec.job_tasks(self.task_type) 295 cluster_spec = self.cluster_spec() 296 cluster_def = cluster_spec.as_cluster_def() if cluster_spec else None 305 def cluster_spec(self): member in TPUClusterResolver 336 cluster_spec = {self.task_type: worker_list} 339 cluster_spec[self._coordinator_name] = [self._coordinator_address] 340 return server_lib.ClusterSpec(cluster_spec)
|
D | tpu_cluster_resolver_test.py | 103 def _verifyClusterSpecEquality(self, cluster_spec, expected_proto): argument 114 self.assertProtoEquals(expected_proto, cluster_spec.as_cluster_def()) 117 server_lib.ClusterSpec(cluster_spec).as_cluster_def()) 120 server_lib.ClusterSpec(cluster_spec.as_cluster_def()).as_cluster_def()) 123 server_lib.ClusterSpec(cluster_spec.as_dict()).as_cluster_def()) 172 actual_cluster_spec = cluster_resolver.cluster_spec() 206 actual_cluster_spec = cluster_resolver.cluster_spec() 233 cluster_resolver.cluster_spec() 254 actual_cluster_spec = cluster_resolver.cluster_spec() 281 cluster_resolver.cluster_spec() [all …]
|
/external/tensorflow/tensorflow/python/distribute/integration_test/ |
D | mwms_peer_failure_test.py | 89 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 90 mpr = multi_process_runner.MultiProcessRunner(worker_fn, cluster_spec) 122 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 123 mpr = multi_process_runner.MultiProcessRunner(worker_fn, cluster_spec) 149 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 152 worker_fn, cluster_spec, args=(attempts,), auto_restart=True) 170 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 173 worker_fn, cluster_spec, args=(attempts,), auto_restart=True) 209 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 212 worker_fn, cluster_spec, args=(attempts,), auto_restart=True)
|
/external/tensorflow/tensorflow/python/tpu/ |
D | tpu_strategy_util.py | 117 cluster_spec = cluster_resolver.cluster_spec() 120 if cluster_spec: 121 session_config.cluster_def.CopyFrom(cluster_spec.as_cluster_def()) 204 cluster_spec = cluster_resolver.cluster_spec() 207 if cluster_spec: 208 session_config.cluster_def.CopyFrom(cluster_spec.as_cluster_def())
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | collective_ops_multi_worker_test.py | 47 cluster=cluster_resolver.cluster_spec().as_cluster_def(), 88 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 89 mpr = multi_process_runner.MultiProcessRunner(worker_fn, cluster_spec) 100 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 101 mpr = multi_process_runner.MultiProcessRunner(worker_fn, cluster_spec) 138 cluster_spec = multi_worker_test_base.create_cluster_spec( 141 worker_fn, cluster_spec, auto_restart=True) 152 cluster_spec = multi_worker_test_base.create_cluster_spec(num_workers=2) 153 mpr = multi_process_runner.MultiProcessRunner(worker_fn, cluster_spec)
|