Extsumm_local_global_context
Extsumm_local_global_context copied to clipboard
No module named 'rouge_papier'
Hi Wendy,
Thanks for your contribution and amazing paper. I cannot successfully run the testing part, and receive the following error. It looks like the problem is related to 'rouge_papier'.
Traceback (most recent call last):
File "test.py", line 150, in <module>
r2, l = eval_seq2seq(test_dataloader,model,hyp_path,LENGTH_LIMIT,pos_weight,device,USE_SECTION_INFO,remove_stopwords,stemmer,meteor=True,lcs=lcs,saveas=SAVE_RESULT_NAME)
File "/home/rachelzheng/Extsumm_local_global_context/run.py", line 94, in eval_seq2seq
rouge2,df = get_rouge(summ_path, ref_path, length_limit,remove_stopwords,stemmer,lcs)
File "/home/rachelzheng/Extsumm_local_global_context/utils.py", line 102, in get_rouge
remove_stopwords=remove_stopwords,stemmer=stemmer,set_length = False, length=length_limit)
File "/home/rachelzheng/Extsumm_local_global_context/venv/lib/python3.6/site-packages/rouge_papier_v2-0.0.1-py3.6.egg/rouge_papier_v2/wrapper.py", line 17, in compute_rouge
File "/home/rachelzheng/Extsumm_local_global_context/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1136, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/home/rachelzheng/Extsumm_local_global_context/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 348, in get_provider
__import__(moduleOrReq)
ModuleNotFoundError: No module named 'rouge_papier'
Can you provide any suggestions on this?
Thank you!
Hi,
It was caused by a minor mistake when adapting the rouge_papier. You could solve it by changing 'rouge_papier' to 'rouge_papier_v2' in line 16&18 in the file rouge_papier_v2/rouge_papier_v2/wrapper.py, and then install the package again.
I have already updated the github code, you can also download the new version if you don't want to dive into the code.
Thanks for your question!
Wen