Git Product home page Git Product logo

Comments (1)

mlomeli1 avatar mlomeli1 commented on September 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.