Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [2.5] remove param num_build_thread #39341

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pkg/util/paramtable/knowhere_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package paramtable

import (
"fmt"
"strconv"
"strings"

"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
Expand All @@ -22,7 +21,6 @@ const (

const (
BuildDramBudgetKey = "build_dram_budget_gb"
NumBuildThreadKey = "num_build_thread"
VecFieldSizeKey = "vec_field_size_gb"
)

Expand Down Expand Up @@ -89,7 +87,6 @@ func (p *knowhereConfig) GetRuntimeParameter(stage string) (map[string]string, e

if stage == BuildStage {
params[BuildDramBudgetKey] = fmt.Sprintf("%f", float32(hardware.GetFreeMemoryCount())/(1<<30))
params[NumBuildThreadKey] = strconv.Itoa(int(float32(hardware.GetCPUNum())))
}

return params, nil
Expand Down
2 changes: 0 additions & 2 deletions pkg/util/paramtable/knowhere_param_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func TestKnowhereConfig_GetRuntimeParameter(t *testing.T) {
params, err := cfg.GetRuntimeParameter(BuildStage)
assert.NoError(t, err)
assert.Contains(t, params, BuildDramBudgetKey)
assert.Contains(t, params, NumBuildThreadKey)

params, err = cfg.GetRuntimeParameter(SearchStage)
assert.NoError(t, err)
Expand Down Expand Up @@ -208,7 +207,6 @@ func TestKnowhereConfig_MergeWithResource(t *testing.T) {
expectedParams: map[string]string{
"existing_key": "existing_value",
BuildDramBudgetKey: "", // We can't predict the exact value, but it should exist
NumBuildThreadKey: "", // We can't predict the exact value, but it should exist
VecFieldSizeKey: "1.000000",
},
},
Expand Down
Loading