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

Method init

caffe2/python/checkpoint.py:469–488  ·  view source on GitHub ↗
(
        self, nodes, retrieve_from_epoch=None, path_prefix=None, path_type=None
    )

Source from the content-addressed store, hash-verified

467 path_type: Indicate the type of path where checkpoint files are stored.
468 """
469 def init(
470 self, nodes, retrieve_from_epoch=None, path_prefix=None, path_type=None
471 ):
472 if self._node_managers is not None:
473 assert [node for node, _ in self._node_managers] == nodes
474 return TaskGroup(WorkspaceType.GLOBAL)
475 self._node_managers = []
476 for node in nodes:
477 with Node(node):
478 manager = CheckpointManager(
479 db_prefix=self._db_prefix,
480 node_name=str(node),
481 db_type=self._db_type)
482 self._node_managers.append((node, manager))
483 return self._task_group(
484 CheckpointManager.init,
485 nodes=[node],
486 retrieve_from_epoch=retrieve_from_epoch,
487 path_prefix=path_prefix,
488 path_type=path_type)
489
490 def load(self, epoch, path_prefix=None, path_type=None):
491 return self._task_group(

Calls 5

_task_groupMethod · 0.95
TaskGroupClass · 0.90
NodeClass · 0.90
CheckpointManagerClass · 0.85
appendMethod · 0.45