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

negative distance returned in IndexFlatL2 range_search query #1266

Closed
2 of 4 tasks
joshim5 opened this issue Jun 25, 2020 · 2 comments
Closed
2 of 4 tasks

negative distance returned in IndexFlatL2 range_search query #1266

joshim5 opened this issue Jun 25, 2020 · 2 comments

Comments

@joshim5
Copy link

joshim5 commented Jun 25, 2020

Summary

This issue was raised in #297 for search. Here I report the same issue still occurs in range_search.

Platform

OS: Ubuntu 18.04

Faiss version: e8c8db8

Faiss compilation options: CUDA 10.1

Running on:

  • CPU
  • GPU

Interface:

  • C++
  • Python

Reproduction instructions

Perhaps this was fixed for index.search(Data, 10), but I get negative distances for index.range_search. Here's an example:

lims, D, I = index.range_search(data, 555)
>>> min(D)
-3145728.0
>>> max(D)
512.0

Is this numerical overflow?

@mdouze
Copy link
Contributor

mdouze commented Jun 26, 2020

Could you post some code to reproduce?

@mdouze
Copy link
Contributor

mdouze commented Jun 28, 2020

@mdouze mdouze closed this as completed Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants