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

Method ping

tensorflow/python/tpu/session_support.py:109–124  ·  view source on GitHub ↗

Ping all workers, returning the parsed status results.

(self, request=None, timeout_in_ms=5000)

Source from the content-addressed store, hash-verified

107 {self._request_placeholder: message.SerializeToString()})
108
109 def ping(self, request=None, timeout_in_ms=5000):
110 """Ping all workers, returning the parsed status results."""
111 if request is None:
112 request = event_pb2.WorkerHeartbeatRequest()
113
114 options = config_pb2.RunOptions(timeout_in_ms=timeout_in_ms)
115 results = self._session.run(
116 self._ops,
117 feed_dict={self._request_placeholder: request.SerializeToString()},
118 options=options)
119 parsed_results = [
120 event_pb2.WorkerHeartbeatResponse.FromString(res_pb)
121 for res_pb in results
122 ]
123 logging.debug('Ping results: %s', parsed_results)
124 return parsed_results
125
126 def lame_workers(self):
127 """Ping all workers, returning manager containing lame workers (or None)."""

Callers 2

lame_workersMethod · 0.95
runMethod · 0.80

Calls 2

runMethod · 0.45
SerializeToStringMethod · 0.45

Tested by

no test coverage detected