Faiss: Use setuptools to install Python package

Created on 3 Mar 2017  Â·  3Comments  Â·  Source: facebookresearch/faiss

I think the lib should have a setup.py install script, so one can easily install it with python setup.py install. What do you think?

I created a first version in this branch: https://github.com/brunodoamaral/faiss/tree/setup-py

The only problem is that I build the .so file using make, instead of creating an Extension on setup.py (I tried it before, but couldn't get makefile.inc parameters to work inside setuptools).

wontfix

Most helpful comment

Hi @mdouze. The idea behind using setuptools is to provide means to install faiss as a module on a Python environment. In the current implementation, one has to copy the lib files inside its project.

I think setuptools is an important step to distribute faiss (the next one should pip instal faiss). But if you think it is not necessary, I'll abandon the idea.

PS: I already deployed faiss in my current project and it searches a 670K x 128 database in less then 1.2ms, using a 4 CPU machine. Pretty neat for my needs.

All 3 comments

Thanks for the suggestion.

I don't think the setup.py simplifies the compilation process, since BLAS and swig are the hardest flags to set, not the Python flags.

Hi @mdouze. The idea behind using setuptools is to provide means to install faiss as a module on a Python environment. In the current implementation, one has to copy the lib files inside its project.

I think setuptools is an important step to distribute faiss (the next one should pip instal faiss). But if you think it is not necessary, I'll abandon the idea.

PS: I already deployed faiss in my current project and it searches a 670K x 128 database in less then 1.2ms, using a 4 CPU machine. Pretty neat for my needs.

@brunodoamaral Good work!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukedeo picture lukedeo  Â·  3Comments

daniellevy picture daniellevy  Â·  3Comments

hashyong picture hashyong  Â·  3Comments

hipitt picture hipitt  Â·  3Comments

0DF0Arc picture 0DF0Arc  Â·  3Comments