From 9a4bbbdd06a4a106f47d74e97e07a39a7358d81b Mon Sep 17 00:00:00 2001 From: "[[ -z $EMAIL ]] && read -e -p \"Enter your email (for git configuration): \" EMAIL" Date: Wed, 8 Jan 2025 12:17:01 -0500 Subject: [PATCH] Should make tests pass --- src/transformers/trainer.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index 51c33cf85d564c..9217129763c28a 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -2216,6 +2216,7 @@ def _inner_training_loop( if args.max_steps < 1: max_steps = math.ceil(args.num_train_epochs * num_update_steps_per_epoch) + num_train_tokens = None if self.args.include_tokens_per_second: num_train_tokens = self.num_tokens(train_dataloader, max_steps) if has_length(train_dataloader) and args.max_steps < 1: