MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / task_address

Method task_address

tensorflow/python/training/server_lib.py:413–435  ·  view source on GitHub ↗

Returns the address of the given task in the given job. Args: job_name: The string name of a job in this cluster. task_index: A non-negative integer. Returns: The address of the given task in the given job. Raises: ValueError: If `job_name` does not name a job

(self, job_name, task_index)

Source from the content-addressed store, hash-verified

411 return list(sorted(job.keys()))
412
413 def task_address(self, job_name, task_index):
414 """Returns the address of the given task in the given job.
415
416 Args:
417 job_name: The string name of a job in this cluster.
418 task_index: A non-negative integer.
419
420 Returns:
421 The address of the given task in the given job.
422
423 Raises:
424 ValueError: If `job_name` does not name a job in this cluster,
425 or no task with index `task_index` is defined in that job.
426 """
427 try:
428 job = self._cluster_spec[job_name]
429 except KeyError:
430 raise ValueError("No such job in cluster: %r" % job_name)
431 try:
432 return job[task_index]
433 except KeyError:
434 raise ValueError("No task with index %r in job %r" %
435 (task_index, job_name))
436
437 def job_tasks(self, job_name):
438 """Returns a mapping from task ID to address in the given job.

Callers 11

as_dictMethod · 0.95
get_workers_listFunction · 0.80
_run_std_serverFunction · 0.80
masterMethod · 0.80
masterMethod · 0.80
masterMethod · 0.80
masterMethod · 0.80
masterMethod · 0.80
masterMethod · 0.80
masterMethod · 0.80

Calls

no outgoing calls

Tested by 1