Skip to content

Commit

Permalink
AMP log message
Browse files Browse the repository at this point in the history
  • Loading branch information
mdw771 committed Apr 11, 2024
1 parent 279d4f5 commit 62417a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions generic_trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,7 @@ def build_amp(self):
HuggingFaceAcceleratePretrainer,
PyTorchLightningTrainer]):
self.use_torch_amp = True
logging.info('Using PyTorch AMP and gradient scaler.')
self.grad_scaler = torch.cuda.amp.GradScaler(enabled=self.use_torch_amp)

def build_model(self):
Expand Down

0 comments on commit 62417a3

Please sign in to comment.