MCPcopy Create free account
hub / github.com/pytorch/examples / train

Method train

distributed/ddp-tutorial-series/multinode.py:71–75  ·  view source on GitHub ↗
(self, max_epochs: int)

Source from the content-addressed store, hash-verified

69 print(f"Epoch {epoch} | Training snapshot saved at {self.snapshot_path}")
70
71 def train(self, max_epochs: int):
72 for epoch in range(self.epochs_run, max_epochs):
73 self._run_epoch(epoch)
74 if self.global_rank == 0 and epoch % self.save_every == 0:
75 self._save_snapshot(epoch)
76
77
78def load_train_objs():

Callers 1

mainFunction · 0.95

Calls 2

_run_epochMethod · 0.95
_save_snapshotMethod · 0.95

Tested by

no test coverage detected