Skip to content

Commit

Permalink
Revert "Fix it to work with BART (huggingface#6756)"
Browse files Browse the repository at this point in the history
This reverts commit 94a8802.
  • Loading branch information
fabiocapsouza authored Nov 15, 2020
1 parent f7ffb65 commit e28f778
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/question-answering/run_squad.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit e28f778

Please sign in to comment.