Alex-Fabbri / Multi-News

Large-scale multi-document summarization dataset and code
Other
276 stars 53 forks source link

Getting error when running on pre-trained model #32

Open chintanshrinath opened 3 years ago

chintanshrinath commented 3 years ago

Hi

Good work!!! When I run "run_test_transformer.sh" using pre-trained model, which I have download from Google Drive, while running this one, getting error like that

File "translate.py", line 37, in main(opt) File "translate.py", line 19, in main translator = build_translator(opt, report_score=True) File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/translate/translator.py", line 38, in build_translator onmt.model_builder.load_test_model(opt, dummy_opt.dict) File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 142, in load_test_model model = build_base_model(model_opt, fields, use_gpu(opt), checkpoint) File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 166, in build_base_model src_embeddings = build_embeddings(model_opt, src_dict, feature_dicts) File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 44, in build_embeddings num_word_embeddings = len(word_dict) File "/usr/local/lib/python3.7/dist-packages/torchtext/vocab.py", line 62, in len return len(self.vocab) File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1131, in getattr type(self).name, name)) AttributeError: 'Vocab' object has no attribute 'vocab'

Can you help me to resolve this?

Thanks

corrine1106 commented 3 years ago

I get the same problem!