Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bruteFoceKnn is deprecated issue has been occurred #5

Open
jjoon0928 opened this issue Jan 26, 2024 · 2 comments
Open

bruteFoceKnn is deprecated issue has been occurred #5

jjoon0928 opened this issue Jan 26, 2024 · 2 comments

Comments

@jjoon0928
Copy link

Hello, I am studying proxy-based deep metric learning and I found the proxy synthesis methodology.

When I execute your code, I saw "bruteForceKnn is deprecated; call bfKnn instead" issue.

How can I update the evaluation.py file?

@geonm
Copy link
Collaborator

geonm commented Jan 26, 2024

Here is a reference: https://gist.github.com/mdouze/94d1d18f4fa84ef58350d54509a7bb3f

@jjoon0928
Copy link
Author

Here is a reference: https://gist.github.com/mdouze/94d1d18f4fa84ef58350d54509a7bb3f

Thank you
bruteForceKnn is deprecated; call bfKnn instead issue is resolved. However another issue has been occurred.
I changed the code below:
faiss.bruteForceKnn(res, faiss.METRIC_INNER_PRODUCT, faiss.swig_ptr(X_gallery), True, ng, faiss.swig_ptr(X_query), True, nq, d, int(kmax + offset), faiss.swig_ptr(D), faiss.swig_ptr(I))
to:
args = faiss.GpuDistanceParams() args.metric = faiss.METRIC_INNER_PRODUCT args.k = int(kmax + offset) args.dims = d args.vectors = faiss.swig_ptr(X_gallery) args.vectorsRowMajor = True args.numVectors = ng args.queries = faiss.swig_ptr(X_query) args.queriesRowMajor = True args.numQueries = nq args.outDistances = faiss.swig_ptr(D) args.outIndices = faiss.swig_ptr(I) faiss.bfKnn(res, args)

but Faiss assertion 'err == CUBLAS_STATUS_SUCCESS' failed in void faiss~~ has been occurred then the code stopped.
What I found is that the macOS might have bugs to use faiss. If I use window, the issue will be resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants