Comments (1)
This was fixed by @mdouze in #3309 (thank you Matthijs for flagging!). @anupsingh15 you need use the nightly package (see INSTALL.md) so this fix is included in the version of faiss you have in your conda environment, for your reference:
conda create -n faiss_1_8_0_nightly python=3.10
conda activate faiss_1_8_0_nightly
conda install -c pytorch/label/nightly -c nvidia faiss-gpu=1.8.0
the output is then
import numpy as np
import faiss
x = np.random.randn(10000,128)
M=32
index_hnsw = faiss.IndexHNSWFlat(128, M)
index_hnsw.hnsw.efConstruction = 40
index_hnsw.hnsw.efSearch = 16
index_hnsw.add(x)
D, I = index_hnsw.search(x[:10], 2)
cands = faiss.cvar.hnsw_stats.ndis #total cands evaluated across all queries
cands
10268
from faiss.
Related Issues (20)
- Creating an array of faiss.Kmeans objects that uses gpu HOT 6
- OnDisk IVF and GPU Search memory issue HOT 2
- Merging indices with IDMap2
- The IVFPQ index has inconsistent memory usage when performing search operations. HOT 2
- Wheather the memory, used during search operation , can be freed ? HOT 2
- Merge or Add data into "ondisk" indices corrupts index ids HOT 2
- faiss-gpu buiild fails on windows 11
- legal issue
- Opening up SearchParameters for IndexBinaryHNSW and IndexBinaryIVF HOT 3
- Extra Memory add_with_ids HOT 2
- make failure on mac - ld: Undefined symbols:
- Fais-cpu fails to build with swig HOT 3
- SearchParametersIVF does not seem to work with IndexHNSWFlat HOT 1
- Faiss assertion 'err == CUBLAS_STATUS_SUCCESS' failed in void faiss::gpu::runMatrixMult(faiss::gpu::Tensor<float, 2, true>&, bool, faiss::gpu::Tensor<T, 2, true>&, bool, HOT 1
- jaccard metric prob HOT 7
- Faiss compatibility with NumPy 2 (ImportError: numpy.core.multiarray failed to import) HOT 6
- faiss + torch.dist: unable to utilize multiple GPU HOT 4
- Build error on Faiss due to missing #includes HOT 1
- How does the ivfflat index use search_preassigned HOT 1
- How to obain codebook from a saved OPQ index? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faiss.