From 376642b933ac69d0f1a369919ead923646106d29 Mon Sep 17 00:00:00 2001 From: cqy123456 <39671710+cqy123456@users.noreply.github.com> Date: Tue, 15 Aug 2023 16:45:34 +0800 Subject: [PATCH] reset diskann min dim limit (#26344) Signed-off-by: cqy123456 --- pkg/util/indexparamcheck/constraints.go | 8 ++++---- pkg/util/indexparamcheck/diskann_checker_test.go | 2 +- tests/python_client/testcases/test_index.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/util/indexparamcheck/constraints.go b/pkg/util/indexparamcheck/constraints.go index da778f3174..e368fbd378 100644 --- a/pkg/util/indexparamcheck/constraints.go +++ b/pkg/util/indexparamcheck/constraints.go @@ -20,10 +20,10 @@ const ( // DefaultMaxDim is the largest dimension supported in Milvus DefaultMaxDim = 32768 - // If Dim = 32 and raw vector data = 2G, query node need 24G disk space When loading the vectors' disk index - // If Dim = 2, and raw vector data = 2G, query node need 240G disk space When loading the vectors' disk index - // So DiskAnnMinDim should be greater than or equal to 32 to avoid running out of disk space - DiskAnnMinDim = 32 + // If Dim = 32 and raw vector data = 2G, query node need ~17G disk space When loading the vectors' disk index + // If Dim = 2, and raw vector data = 2G, query node need ~60G disk space When loading the vectors' disk index + // So DiskAnnMinDim should be greater than or equal to 8 to avoid running out of disk space + DiskAnnMinDim = 8 HNSWMinEfConstruction = 8 HNSWMaxEfConstruction = 512 diff --git a/pkg/util/indexparamcheck/diskann_checker_test.go b/pkg/util/indexparamcheck/diskann_checker_test.go index 2d228ad85b..374b5b33f2 100644 --- a/pkg/util/indexparamcheck/diskann_checker_test.go +++ b/pkg/util/indexparamcheck/diskann_checker_test.go @@ -23,7 +23,7 @@ func Test_diskannChecker_CheckTrain(t *testing.T) { } invalidParamsSmallDim := copyParams(validParams) - invalidParamsSmallDim[DIM] = strconv.Itoa(15) + invalidParamsSmallDim[DIM] = strconv.Itoa(4) p1 := map[string]string{ DIM: strconv.Itoa(128), diff --git a/tests/python_client/testcases/test_index.py b/tests/python_client/testcases/test_index.py index bfb55d52bc..775ba07723 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -1881,7 +1881,7 @@ class TestIndexDiskann(TestcaseBase): t.join() @pytest.mark.tags(CaseLabel.L1) - @pytest.mark.parametrize("dim", [1, 2, 8, 16, 24, 31]) + @pytest.mark.parametrize("dim", [1, 2, 4, 6]) def test_create_index_with_small_dim(self, dim): """ target: test create index with diskann