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

Method _reset_manager

tensorflow/python/tpu/session_support.py:223–243  ·  view source on GitHub ↗

Reset the graph, session and worker manager.

(self)

Source from the content-addressed store, hash-verified

221 self._worker_manager = None
222
223 def _reset_manager(self):
224 """Reset the graph, session and worker manager."""
225 self._graph = ops.Graph()
226 self._session = session_lib.Session(
227 target=self._target,
228 graph=self._graph,
229 config=self._config,
230 )
231
232 if self._devices is None:
233 self._devices = all_worker_devices(self._session)
234
235 with self._graph.as_default():
236 self._worker_manager = WorkerHeartbeatManager.from_devices(
237 self._session, self._devices)
238
239 self._worker_manager.configure(
240 event_pb2.WorkerHeartbeatRequest(
241 watchdog_config=event_pb2.WatchdogConfig(
242 timeout_ms=self.shutdown_timeout * 1000,),
243 shutdown_mode=event_pb2.WAIT_FOR_COORDINATOR))
244
245 def configure_and_run(self):
246 logging.info(

Callers 2

configure_and_runMethod · 0.95
runMethod · 0.95

Calls 6

all_worker_devicesFunction · 0.85
from_devicesMethod · 0.80
GraphMethod · 0.45
SessionMethod · 0.45
as_defaultMethod · 0.45
configureMethod · 0.45

Tested by

no test coverage detected