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

Method train

distributed/ddp-tutorial-series/multigpu_torchrun.py:70–74  ·  view source on GitHub ↗
(self, max_epochs: int)

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.95

Calls 2

_run_epochMethod · 0.95
_save_snapshotMethod · 0.95

Tested by

no test coverage detected