Closed edwinkys closed 6 months ago
This PR is to fix the bug in this Google Colab notebook: https://colab.research.google.com/drive/1zQtpXkkWASt_37aiA7m5ZZcMqBnUGxOZ?usp=sharing
In short, the search result distance returned is that of Euclidean instead of the configured Cosine.
https://github.com/oasysai/oasysdb/blob/b04772b5dc9fc27faab3e2c42a1f39885f9c2628/src/func/collection.rs#L297
https://github.com/oasysai/oasysdb/blob/b04772b5dc9fc27faab3e2c42a1f39885f9c2628/src/func/utils.rs#L337-L349
I added a new test in Python to check the result.
Purpose
This PR is to fix the bug in this Google Colab notebook: https://colab.research.google.com/drive/1zQtpXkkWASt_37aiA7m5ZZcMqBnUGxOZ?usp=sharing
In short, the search result distance returned is that of Euclidean instead of the configured Cosine.
Cause
https://github.com/oasysai/oasysdb/blob/b04772b5dc9fc27faab3e2c42a1f39885f9c2628/src/func/collection.rs#L297
https://github.com/oasysai/oasysdb/blob/b04772b5dc9fc27faab3e2c42a1f39885f9c2628/src/func/utils.rs#L337-L349
Testing
I added a new test in Python to check the result.
Chore checklist