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

Method build

caffe2/python/checkpoint_test.py:56–64  ·  view source on GitHub ↗
(self, epoch, checkpoint_manager)

Source from the content-addressed store, hash-verified

54 self.dest_dir = dest_dir
55
56 def build(self, epoch, checkpoint_manager):
57 with TaskGroup(WorkspaceType.GLOBAL) as upload_task_group:
58 for node, manager in checkpoint_manager._node_managers:
59 with Node(str(node)), Task():
60 src_path = db_name(epoch, manager._node_name, manager._db_prefix)
61 dest_path = os.path.join(self.dest_dir, str(node))
62 ops.Python((local_copy_op,
63 [src_path, dest_path], {}))([], [])
64 return upload_task_group
65
66
67class TestCheckpoint(TestCase):

Callers

nothing calls this directly

Calls 6

TaskGroupClass · 0.90
NodeClass · 0.90
TaskClass · 0.90
db_nameFunction · 0.90
PythonMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected