ann-benchmarks icon indicating copy to clipboard operation
ann-benchmarks copied to clipboard

How do you know the interface of faiss python?

Open KunmingS opened this issue 5 years ago • 4 comments

I want to add some faiss algorithms on this project, but I can't find description of faiss python interface. How do you get these information?

KunmingS avatar Apr 15 '21 06:04 KunmingS

I am not completely sure what you mean, but you can just take a look how we implemented IVF/LSH/HNSW in https://github.com/erikbern/ann-benchmarks/tree/master/ann_benchmarks/algorithms. I've implemented these following https://github.com/facebookresearch/faiss/wiki/Faiss-indexes if I remember correctly.

maumueller avatar Apr 15 '21 06:04 maumueller

I am not completely sure what you mean, but you can just take a look how we implemented IVF/LSH/HNSW in https://github.com/erikbern/ann-benchmarks/tree/master/ann_benchmarks/algorithms. I've implemented these following https://github.com/facebookresearch/faiss/wiki/Faiss-indexes if I remember correctly.

I had seen IVF/LSH/HNSW, they are fantastic implementation. I just wondering how do you know the argument of faiss function, such as search(), is that same as c++?

KunmingS avatar Apr 15 '21 08:04 KunmingS

I think I took it from the examples the pasted on the wiki. You can always take a look at https://github.com/facebookresearch/faiss/blob/master/faiss/python/init.py, or just do help(...) on the index object to see its methods.

maumueller avatar Apr 15 '21 08:04 maumueller

I think I took it from the examples the pasted on the wiki. You can always take a look at https://github.com/facebookresearch/faiss/blob/master/faiss/python/init.py, or just do help(...) on the index object to see its methods.

Thanks! That solved my question.

KunmingS avatar Apr 15 '21 08:04 KunmingS