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

Method end

tensorflow/python/tpu/async_checkpoint.py:132–146  ·  view source on GitHub ↗
(self, session)

Source from the content-addressed store, hash-verified

130 run_context.request_stop()
131
132 def end(self, session):
133 if self._save_thread:
134 logging.info("Waiting for any pending checkpoints to finish.")
135 self._save_thread.join()
136 if self._write_graph_thread:
137 logging.info("Waiting for any pending write_graph to finish.")
138 self._write_graph_thread.join()
139
140 last_step = session.run(self._global_step_tensor)
141
142 if self._last_checkpoint_step != last_step:
143 self._save(session, last_step, asynchronous=False)
144
145 for l in self._listeners:
146 l.end(session, last_step)
147
148 def _save(self, session, step, asynchronous=True):
149 """Saves the latest checkpoint, returns should_stop."""

Callers

nothing calls this directly

Calls 4

_saveMethod · 0.95
infoMethod · 0.80
joinMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected