From e28f778a816bef25276594778f611d9873b91bc9 Mon Sep 17 00:00:00 2001 From: fabiocapsouza Date: Sun, 15 Nov 2020 12:30:46 -0300 Subject: [PATCH] Revert "Fix it to work with BART (#6756)" This reverts commit 94a880229aa33fbbab8029d1f427ea60d5842f7a. --- examples/question-answering/run_squad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/question-answering/run_squad.py b/examples/question-answering/run_squad.py index 01d00d2b79a34a..faaffea50191b3 100644 --- a/examples/question-answering/run_squad.py +++ b/examples/question-answering/run_squad.py @@ -187,7 +187,7 @@ def train(args, train_dataset, model, tokenizer): "end_positions": batch[4], } - if args.model_type in ["xlm", "roberta", "distilbert", "camembert", "bart"]: + if args.model_type in ["xlm", "roberta", "distilbert", "camembert"]: del inputs["token_type_ids"] if args.model_type in ["xlnet", "xlm"]: @@ -300,7 +300,7 @@ def evaluate(args, model, tokenizer, prefix=""): "token_type_ids": batch[2], } - if args.model_type in ["xlm", "roberta", "distilbert", "camembert", "bart"]: + if args.model_type in ["xlm", "roberta", "distilbert", "camembert"]: del inputs["token_type_ids"] feature_indices = batch[3]