Reset the graph, session and worker manager.
(self)
| 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( |
no test coverage detected