From b91878857e15df24ace342e84a9ce3af94322289 Mon Sep 17 00:00:00 2001 From: foxspy Date: Wed, 15 Oct 2025 19:18:00 +0800 Subject: [PATCH] fix: update aisaq param (#44861) issue: #44365 Signed-off-by: xianliang.li --- configs/milvus.yaml | 7 +++++++ internal/datanode/index/task_index.go | 9 +++------ pkg/util/paramtable/knowhere_param.go | 8 ++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/configs/milvus.yaml b/configs/milvus.yaml index e893e9dc77..f499e57753 100644 --- a/configs/milvus.yaml +++ b/configs/milvus.yaml @@ -1379,6 +1379,13 @@ streaming: # Any configuration related to the knowhere vector search engine knowhere: enable: true # When enable this configuration, the index parameters defined following will be automatically populated as index parameters, without requiring user input. + AISAQ: + build: + max_degree: 56 # Maximum degree of the Vamana graph + pq_code_budget_gb_ratio: 0.125 # Size limit on the PQ code (compared with raw data) + search_list_size: 100 # Size of the candidate list during building graph + search: + beam_width_ratio: 4 # Ratio between the maximum number of IO requests per search iteration and CPU number DISKANN: build: max_degree: 56 # Maximum degree of the Vamana graph diff --git a/internal/datanode/index/task_index.go b/internal/datanode/index/task_index.go index b2854592d3..cf78f61042 100644 --- a/internal/datanode/index/task_index.go +++ b/internal/datanode/index/task_index.go @@ -228,13 +228,10 @@ func (it *indexBuildTask) Execute(ctx context.Context) error { indexType := it.newIndexParams[common.IndexTypeKey] var fieldDataSize uint64 var err error - if vecindexmgr.GetVecIndexMgrInstance().IsDiskANN(indexType) { - fieldDataSize, err = estimateFieldDataSize(it.req.GetDim(), it.req.GetNumRows(), it.req.GetField().GetDataType()) - if err != nil { - log.Warn("get local used size failed") - return err - } + // Ignore the error here, this param will only be used for diskann and aisaq + fieldDataSize, _ = estimateFieldDataSize(it.req.GetDim(), it.req.GetNumRows(), it.req.GetField().GetDataType()) + if vecindexmgr.GetVecIndexMgrInstance().IsDiskANN(indexType) { err = indexparams.SetDiskIndexBuildParams(it.newIndexParams, int64(fieldDataSize)) if err != nil { log.Warn("failed to fill disk index params", zap.Error(err)) diff --git a/pkg/util/paramtable/knowhere_param.go b/pkg/util/paramtable/knowhere_param.go index 1d7d1a8f88..ebf41f555b 100644 --- a/pkg/util/paramtable/knowhere_param.go +++ b/pkg/util/paramtable/knowhere_param.go @@ -44,6 +44,14 @@ func (p *knowhereConfig) init(base *BaseTable) { return "Size of the candidate list during building graph" case "DISKANN.search.beam_width_ratio": return "Ratio between the maximum number of IO requests per search iteration and CPU number" + case "AISAQ.build.max_degree": + return "Maximum degree of the Vamana graph" + case "AISAQ.build.pq_code_budget_gb_ratio": + return "Size limit on the PQ code (compared with raw data)" + case "AISAQ.build.search_list_size": + return "Size of the candidate list during building graph" + case "AISAQ.search.beam_width_ratio": + return "Ratio between the maximum number of IO requests per search iteration and CPU number" default: return "" }