From 9a473f1e43221348334b9e7f95bb45770b7ef268 Mon Sep 17 00:00:00 2001 From: MichaelJanz <66110831+MichaelJanz@users.noreply.github.com> Date: Tue, 30 Jun 2020 08:05:01 +0200 Subject: [PATCH] Update Bertabs example to work again (#5355) * Fix the bug 'Attempted relative import with no known parent package' when using the bertabs example. Also change the used model from bertabs-finetuned-cnndm, since it seems not be accessible anymore * Update run_summarization.py Co-authored-by: Kevin Canwen Xu --- examples/seq2seq/bertabs/run_summarization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/seq2seq/bertabs/run_summarization.py b/examples/seq2seq/bertabs/run_summarization.py index 5dd8f22729..cf4806d221 100644 --- a/examples/seq2seq/bertabs/run_summarization.py +++ b/examples/seq2seq/bertabs/run_summarization.py @@ -30,7 +30,7 @@ Batch = namedtuple("Batch", ["document_names", "batch_size", "src", "segs", "mas def evaluate(args): tokenizer = BertTokenizer.from_pretrained("bert-base-uncased", do_lower_case=True) - model = BertAbs.from_pretrained("bertabs-finetuned-cnndm") + model = BertAbs.from_pretrained("remi/bertabs-finetuned-extractive-abstractive-summarization") model.to(args.device) model.eval()