princeton-nlp / SimCSE

[EMNLP 2021] SimCSE: Simple Contrastive Learning of Sentence Embeddings https://arxiv.org/abs/2104.08821
MIT License
3.33k stars 505 forks source link

No module named prettytable #185

Closed sundavid2002 closed 2 years ago

sundavid2002 commented 2 years ago

I downloaded the SimCSE folder and tried training a supervised roBERTa model in Python. I was able to perform all the steps up to running the evaluation.py file without error. However, when I tried running the evaluation.py file, I was told I needed a module named prettytable b/c evaluation.py uses it on line 6. I installed pretty table by executing "pip install prettytable" , but running evaluation.py again still returned the same message. What's going on? Do I need to install a specific version?

sundavid2002 commented 2 years ago

*I downloaded the SimCSE folder in this post by clicking "Download zip" under "Code"

gaotianyu1350 commented 2 years ago

Hi,

Can you post the exact error message here? Thanks!

sundavid2002 commented 2 years ago

Traceback (most recent call last): File "/Users/davidsun/Downloads/SimCSE/evaluation.py", line 6, in from prettytable import PrettyTable ImportError: No module named prettytable

gaotianyu1350 commented 2 years ago

Hi,

This should be able to address by pip install prettytable.

sundavid2002 commented 2 years ago

I no longer need help w/ this issue