princeton-nlp / SimCSE

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

Numpy version for M1 mac #140

Closed artem-buyak closed 2 years ago

artem-buyak commented 2 years ago

Good afternoon, I wanted to use your library in my project, but unfortunately. Installing dependencies requires "numpy>=1.19.5,<1.20", but on M1 it throws an error with numpy ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 80 from PyObject. I have researched how to fix this error and they say to raise the numpy version. Is it possible to update the dependencies for this project to work with numpy 1.20+ as without this I get a version conflict.

gaotianyu1350 commented 2 years ago

Hi,

I think you can use a higher version of numpy. BTW on M1 I suggest using conda (although I haven't tested it but I heard it provides better compatibility for M1).

smolskayanastassia commented 2 years ago

@gaotianyu1350 I also couldn't install SimCSE with numpy 1.20+ on M1. Is it possible to update dependencies?

gaotianyu1350 commented 2 years ago

I think any numpy version could work. You can just install the number that works on your machine.