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

Method load

caffe2/python/checkpoint.py:271–293  ·  view source on GitHub ↗

Build a Task that will be run by JobRunner when the job is to be resumed from a given epoch. This task will run a Load op that will load and deserialize all relevant blobs from a persistent storage.

(self, epoch, path_prefix=None, path_type=None)

Source from the content-addressed store, hash-verified

269 )
270
271 def load(self, epoch, path_prefix=None, path_type=None):
272 """
273 Build a Task that will be run by JobRunner when the job is to be
274 resumed from a given epoch. This task will run a Load op that will
275 load and deserialize all relevant blobs from a persistent storage.
276 """
277 self._current_db_name = db_name(
278 epoch, self._node_name, self._db_prefix, path_prefix
279 )
280 db_type = path_type or self._db_type
281 logger.info("Loading checkpoints from = %s" % self._current_db_name)
282
283 def add_op():
284 ops.Load(
285 [],
286 self.blob_list(),
287 db=self._current_db_name,
288 db_type=db_type,
289 absolute_path=True,
290 keep_device=True,
291 )
292
293 return self._timed_task('checkpoint_load', add_op)
294
295 def load_blobs_from_checkpoint(self, blob_names, epoch):
296 """

Callers 12

gen_op.pyFile · 0.45
sample.pyFile · 0.45
run_withMethod · 0.45
setUpModuleFunction · 0.45
testBlobsMethod · 0.45
trainMethod · 0.45
_test_onnx_importerMethod · 0.45
OptimizeFunction · 0.45
compare_testMethod · 0.45
get_c2_model_dbgMethod · 0.45
prepare_zip_archiveMethod · 0.45

Calls 3

_timed_taskMethod · 0.95
db_nameFunction · 0.85
infoMethod · 0.80

Tested by 5

run_withMethod · 0.36
setUpModuleFunction · 0.36
testBlobsMethod · 0.36
_test_onnx_importerMethod · 0.36
compare_testMethod · 0.36