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

Method saver

tensorflow/python/tpu/session_support.py:351–369  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

349 'No workers support hearbeats. Failure handling will be disabled.')
350
351 def saver(self):
352 if self._saver:
353 return self._saver
354
355 savers = ops.get_collection(ops.GraphKeys.SAVERS)
356 if not savers:
357 return None
358
359 if not isinstance(savers, list):
360 return savers
361
362 if len(savers) > 1:
363 logging.error(
364 'Multiple savers in the SAVERS collection. On-demand checkpointing '
365 'will be disabled. Pass an explicit `saver` to the constructor to '
366 'override this behavior.')
367 return None
368
369 return savers[0]
370
371 def after_run(self, run_context, run_values):
372 del run_values

Callers 2

after_create_sessionMethod · 0.95
after_runMethod · 0.95

Calls 2

errorMethod · 0.80
get_collectionMethod · 0.45

Tested by

no test coverage detected