Remove unnecessary epoch variable

This commit is contained in:
Bilal Khan 2019-11-28 19:20:29 -06:00 committed by Lysandre Debut
parent 9626e0458c
commit 79526f82f5

View File

@ -245,7 +245,7 @@ def train(args, train_dataset, model, tokenizer):
model.zero_grad()
train_iterator = trange(epochs_trained, int(args.num_train_epochs), desc="Epoch", disable=args.local_rank not in [-1, 0])
set_seed(args) # Added here for reproducibility (even between python 2 and 3)
for epoch in train_iterator:
for _ in train_iterator:
epoch_iterator = tqdm(train_dataloader, desc="Iteration", disable=args.local_rank not in [-1, 0])
for step, batch in enumerate(epoch_iterator):