From 7e3323a518fdc22b7c31a2be37f14ca1c22f6ea1 Mon Sep 17 00:00:00 2001 From: cqy123456 <39671710+cqy123456@users.noreply.github.com> Date: Thu, 17 Aug 2023 20:26:20 +0800 Subject: [PATCH] update dimension range of diskann. (#26405) Signed-off-by: cqy123456 --- pkg/util/indexparamcheck/constraints.go | 5 ----- pkg/util/indexparamcheck/diskann_checker.go | 7 ------- pkg/util/indexparamcheck/diskann_checker_test.go | 2 +- tests/python_client/testcases/test_index.py | 1 + 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/pkg/util/indexparamcheck/constraints.go b/pkg/util/indexparamcheck/constraints.go index e368fbd378..97222010c1 100644 --- a/pkg/util/indexparamcheck/constraints.go +++ b/pkg/util/indexparamcheck/constraints.go @@ -20,11 +20,6 @@ const ( // DefaultMaxDim is the largest dimension supported in Milvus DefaultMaxDim = 32768 - // 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 HNSWMinM = 4 diff --git a/pkg/util/indexparamcheck/diskann_checker.go b/pkg/util/indexparamcheck/diskann_checker.go index 05d581ef5a..3f2401851e 100644 --- a/pkg/util/indexparamcheck/diskann_checker.go +++ b/pkg/util/indexparamcheck/diskann_checker.go @@ -9,13 +9,6 @@ func (c diskannChecker) StaticCheck(params map[string]string) error { return c.staticCheck(params) } -func (c diskannChecker) CheckTrain(params map[string]string) error { - if !CheckIntByRange(params, DIM, DiskAnnMinDim, DefaultMaxDim) { - return errOutOfRange(DIM, DiskAnnMinDim, DefaultMaxDim) - } - return c.StaticCheck(params) -} - func newDiskannChecker() IndexChecker { return &diskannChecker{} } diff --git a/pkg/util/indexparamcheck/diskann_checker_test.go b/pkg/util/indexparamcheck/diskann_checker_test.go index 374b5b33f2..0b1263c7c5 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(4) + invalidParamsSmallDim[DIM] = strconv.Itoa(0) 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 775ba07723..47f415bbd9 100644 --- a/tests/python_client/testcases/test_index.py +++ b/tests/python_client/testcases/test_index.py @@ -1880,6 +1880,7 @@ class TestIndexDiskann(TestcaseBase): for t in threads: t.join() + @pytest.mark.skip(reason = "diskann dim range is set to be [1, 32768)") @pytest.mark.tags(CaseLabel.L1) @pytest.mark.parametrize("dim", [1, 2, 4, 6]) def test_create_index_with_small_dim(self, dim):