[Add costomized metrics] how to implement a new metrics so that I can use for collection indexing? #39426
-
I want to implement some modification based on Internal Product metrics, how to contribution the code? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
So far we don't have a plan to support customized metric type. This feature requires a good design for how to define customized metric from client-side and how to convert the options to algorithms in search engine. So, I don't think a specific user should implement it. We intend to collect more requirements from more users, and summarize them before we can design it well. So far, we don't have enough input from users to understand what customized metrics they want. It would be helpful if you could offer more details about what metrics you want. |
Beta Was this translation helpful? Give feedback.
-
To add new metrics, i think we need to follow the following stype https://github.com/zilliztech/knowhere/blob/main/src/common/metric.h at knowhere, add a special metrics named customize. The customize function need to read a config and load dynamic lib and user need to implement DistanceComputer interface with customize distance(This is performance related) Then at milvus, add a wrapper of supporting to use customized function is all we need. @jayxio let me know if this is clear to you |
Beta Was this translation helpful? Give feedback.
To add new metrics, i think we need to follow the following stype
https://github.com/zilliztech/knowhere/blob/main/src/common/metric.h
at knowhere, add a special metrics named customize. The customize function need to read a config and load dynamic lib and user need to implement DistanceComputer interface with customize distance(This is performance related)
Then at milvus, add a wrapper of supporting to use customized function is all we need.
@jayxio let me know if this is clear to you