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

Function _is_distributed

tensorflow/contrib/learn/python/learn/learn_runner.py:265–277  ·  view source on GitHub ↗

Returns true if this is a distributed job.

(config)

Source from the content-addressed store, hash-verified

263
264
265def _is_distributed(config):
266 """Returns true if this is a distributed job."""
267 if not config.cluster_spec:
268 return False
269
270 # This is considered a distributed job if there is more than one task
271 # in the cluster spec.
272 task_count = 0
273 for job in config.cluster_spec.jobs:
274 for _ in config.cluster_spec.job_tasks(job):
275 task_count += 1
276
277 return task_count > 1
278
279
280def _get_default_schedule(config):

Callers 1

_get_default_scheduleFunction · 0.85

Calls 1

job_tasksMethod · 0.80

Tested by

no test coverage detected