[BUG] Improve python tests of ANN algorithm for `int8`/`uint8` and `inner_product`
Nobody has claimed this yet.
- Dominant language
- Cuda
- Stars
- 854
- Forks
- 236
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 62
Description
ANN algorithm with metric=inner_product and dtype=int8 or uint8 are not tested properly.
In pytest the dataset generated is in (u)int8, then it gets normalized and transformed in float.
So when testing those dtypes the pytests are skipped (cagra) or they end up testing float inputs (ivf_flat/pq).
The inner_product is compared with sklearn cosine since they don't have IP distance, but the queries are also not normalized.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pytest coverage for the cagra, ivf_flat, and pq ANN algorithms. Check how datasets and queries are normalized or converted before testing int8/uint8 inputs, and review the sklearn cosine comparison for inner_product. Done means these tests exercise the intended integer inputs and correctly compare normalized queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100