MCPcopy Index your code
hub / github.com/pytorch/pytorch / save

Method save

caffe2/python/checkpoint.py:350–366  ·  view source on GitHub ↗

Build a Task that is run once after `init_group` and after each epoch is run. This will execute a Save ops to serialize and persist blobs present in the global workspace.

(self, epoch)

Source from the content-addressed store, hash-verified

348 self._metadata_handler.report(action_name, all_stats)
349
350 def save(self, epoch):
351 """
352 Build a Task that is run once after `init_group` and after each
353 epoch is run. This will execute a Save ops to serialize and persist
354 blobs present in the global workspace.
355 """
356 self._current_db_name = db_name(epoch, self._node_name, self._db_prefix)
357 logger.info('Saving to %s' % self._current_db_name)
358
359 def add_op():
360 ops.Save(
361 self.blob_list(), [],
362 db=self._current_db_name,
363 db_type=self._db_type,
364 absolute_path=True)
365
366 return self._timed_task('checkpoint_save', add_op)
367
368 def write_checkpoint_metadata(self, epoch):
369 """

Callers 4

_test_unary_opMethod · 0.45
test_logitMethod · 0.45
_get_modules_bytesMethod · 0.45
save_checkpointsMethod · 0.45

Calls 3

_timed_taskMethod · 0.95
db_nameFunction · 0.85
infoMethod · 0.80

Tested by 3

_test_unary_opMethod · 0.36
test_logitMethod · 0.36
_get_modules_bytesMethod · 0.36