From c64de50ea4b4cec7e87732abb621bf70c8fa8763 Mon Sep 17 00:00:00 2001 From: Jade Abbott Date: Thu, 3 Jan 2019 12:34:57 +0200 Subject: [PATCH] nb_tr_steps is not initialized --- examples/run_classifier.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/run_classifier.py b/examples/run_classifier.py index c99cc0e12a..8441c86937 100644 --- a/examples/run_classifier.py +++ b/examples/run_classifier.py @@ -503,6 +503,7 @@ def main(): t_total=t_total) global_step = 0 + nb_tr_steps = 0 tr_loss = 0 if args.do_train: train_features = convert_examples_to_features( @@ -565,6 +566,7 @@ def main(): if args.do_eval and (args.local_rank == -1 or torch.distributed.get_rank() == 0): eval_examples = processor.get_dev_examples(args.data_dir) + # should tokenize this too. eval_features = convert_examples_to_features( eval_examples, label_list, args.max_seq_length, tokenizer) logger.info("***** Running evaluation *****")