Closed cococo2000 closed 1 month ago
Thanks!
Hello coco @cococo2000 ! I am a database developer. Recently, I need to use ann_benchmark to test the performance of mainstream vector databases. I noticed that you recently updated the Milvus part of ann_benchmark. Have you verified that this part can produce results? Due to development needs, I need to conduct offline testing in a CentOS environment. Can the Milvus after this submission achieve this? I have been trying for a long time to run the Milvus testing part before your commits, but it didn't work.
Hello coco @cococo2000 ! I am a database developer. Recently, I need to use ann_benchmark to test the performance of mainstream vector databases. I noticed that you recently updated the Milvus part of ann_benchmark. Have you verified that this part can produce results? Due to development needs, I need to conduct offline testing in a CentOS environment. Can the Milvus after this submission achieve this? I have been trying for a long time to run the Milvus testing part before your commits, but it didn't work.
I have tested the Milvus part of ann_benchmark on Ubuntu, and it has successfully produced results. Additionally, it has passed the GitHub Actions tests. However, I have not verified it on CentOS specifically. You might need to make minor adjustments based on your specific environment.
Description:
This PR updates the test_hamming function in our pytest suite to correctly reflect the normalized Hamming distance. The previous test was expecting a raw Hamming distance of 2, but since our metric function calculates the normalized Hamming distance, the expected value should be 0.5.
Changes:
Updated the expected values in test_hamming from 2 to 0.5 to align with the normalized Hamming distance calculation. Reasoning: The metrics["hamming"].distance function calculates the normalized Hamming distance by taking the mean of the boolean XOR results. Thus, for arrays p and q given in the tests:
p = [1, 1, 0, 0] q = [1, 0, 0, 1] The raw Hamming distance is 2 (two differing positions), and the normalized Hamming distance is 2/4 = 0.5.