mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
22bb84fa9d
issue: https://github.com/milvus-io/milvus/issues/29230 this pr do these things: 1. add gpu brute force; 2. limit gpu index only support l2 / ip; Signed-off-by: cqy123456 <qianya.cheng@zilliz.com>
23 lines
575 B
Go
23 lines
575 B
Go
package indexparamcheck
|
|
|
|
import "fmt"
|
|
|
|
type raftBruteForceChecker struct {
|
|
floatVectorBaseChecker
|
|
}
|
|
|
|
// raftBrustForceChecker checks if a Brute_Force index can be built.
|
|
func (c raftBruteForceChecker) CheckTrain(params map[string]string) error {
|
|
if err := c.floatVectorBaseChecker.CheckTrain(params); err != nil {
|
|
return err
|
|
}
|
|
if !CheckStrByValues(params, Metric, RaftMetrics) {
|
|
return fmt.Errorf("metric type not found or not supported, supported: %v", RaftMetrics)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func newRaftBruteForceChecker() IndexChecker {
|
|
return &raftBruteForceChecker{}
|
|
}
|