Skip to content
Snippets Groups Projects
Commit 09620efa authored by FluorineDog's avatar FluorineDog Committed by yefu.chen
Browse files

Merge from master


Signed-off-by: default avatarFluorineDog <guilin.gou@zilliz.com>
parent adf77c42
No related branches found
No related tags found
No related merge requests found
......@@ -8,16 +8,24 @@ import (
)
const (
IvfPq = "IVF_PQ"
IvfFlatNM = "IVF_FLAT"
BinFlat = "BIN_FLAT"
// index type
IvfPq = "IVF_PQ"
IvfFlatNM = "IVF_FLAT"
BinIvfFlat = "BIN_IVF_FLAT"
BinFlat = "BIN_FLAT"
// metric type
L2 = "L2"
IP = "IP"
hamming = "HAMMING"
Jaccard = "JACCARD"
dim = 8
nlist = 100
m = 4
nbits = 8
L2 = "L2"
Jaccard = "JACCARD"
nb = 8 * 10000
sliceSize = 4
)
type testCase struct {
......@@ -29,13 +37,18 @@ type testCase struct {
func generateFloatVectorTestCases() []testCase {
return []testCase{
{IvfPq, L2, false},
{IvfPq, IP, false},
{IvfFlatNM, L2, false},
{IvfFlatNM, IP, false},
}
}
func generateBinaryVectorTestCases() []testCase {
return []testCase{
//{BinIvfFlat, Jaccard, true},
//{BinIvfFlat, hamming, true},
{BinFlat, Jaccard, true},
{BinFlat, hamming, true},
}
}
......@@ -53,11 +66,20 @@ func generateParams(indexType, metricType string) (map[string]string, map[string
indexParams["nlist"] = strconv.Itoa(nlist)
indexParams["m"] = strconv.Itoa(m)
indexParams["nbits"] = strconv.Itoa(nbits)
indexParams["SLICE_SIZE"] = strconv.Itoa(sliceSize)
} else if indexType == BinIvfFlat {
indexParams["dim"] = strconv.Itoa(dim)
indexParams["nlist"] = strconv.Itoa(nlist)
indexParams["m"] = strconv.Itoa(m)
indexParams["nbits"] = strconv.Itoa(nbits)
indexParams["SLICE_SIZE"] = strconv.Itoa(sliceSize)
} else if indexType == IvfFlatNM {
indexParams["dim"] = strconv.Itoa(dim)
indexParams["nlist"] = strconv.Itoa(nlist)
} else if indexType == BinFlat {
indexParams["dim"] = strconv.Itoa(dim)
} else {
panic("")
}
return typeParams, indexParams
......
......@@ -79,8 +79,11 @@ func CreateBuilder(ctx context.Context) (*Builder, error) {
Creds: credentials.NewStaticV4(minIOAccessKeyID, minIOSecretAccessKey, ""),
Secure: minIOUseSSL,
})
b.kv, err = miniokv.NewMinIOKV(b.loopCtx, minIOClient, "milvus-distributed-indexbuilder")
if err != nil {
return nil, err
}
b.kv, err = miniokv.NewMinIOKV(b.loopCtx, minIOClient, "milvus-distributed-indexbuilder")
if err != nil {
return nil, err
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment