diff --git a/tests/python_client/common/common_func.py b/tests/python_client/common/common_func.py index 84f646c510..4146622e33 100644 --- a/tests/python_client/common/common_func.py +++ b/tests/python_client/common/common_func.py @@ -486,10 +486,15 @@ def gen_invaild_search_params_type(): def gen_search_param(index_type, metric_type="L2"): search_params = [] - if index_type in ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ"]: - for nprobe in [64, 128]: - ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}} + if index_type in ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "GPU_FLAT", "GPU_IVF_FLAT", "GPU_IVF_PQ", "GPU_IVF_SQ8", + "RAFT_IVF_FLAT", "RAFT_IVF_PQ"]: + if index_type in ["GPU_FLAT"]: + ivf_search_params = {"metric_type": metric_type, "params": {}} search_params.append(ivf_search_params) + else: + for nprobe in [64, 128]: + ivf_search_params = {"metric_type": metric_type, "params": {"nprobe": nprobe}} + search_params.append(ivf_search_params) elif index_type in ["BIN_FLAT", "BIN_IVF_FLAT"]: if metric_type not in ct.binary_metrics: log.error("Metric type error: binary index only supports distance type in (%s)" % ct.binary_metrics) diff --git a/tests/python_client/common/common_type.py b/tests/python_client/common/common_type.py index f6323426fa..a35de3bf59 100644 --- a/tests/python_client/common/common_type.py +++ b/tests/python_client/common/common_type.py @@ -187,7 +187,7 @@ all_index_types = ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_PQ", "HNSW", "ANNOY", "DI default_index_params = [{"nlist": 128}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"M": 48, "efConstruction": 500}, {"n_trees": 50}, {}, {"nlist": 128}, {"nlist": 128}, - {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"nlist": 128}, + {}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}, {"nlist": 128}, {"nlist": 128}, {"nlist": 128, "m": 16, "nbits": 8}] Handler_type = ["GRPC", "HTTP"] diff --git a/tests/python_client/testcases/test_search.py b/tests/python_client/testcases/test_search.py index e89920f7e0..0425d17f5a 100644 --- a/tests/python_client/testcases/test_search.py +++ b/tests/python_client/testcases/test_search.py @@ -5164,14 +5164,14 @@ class TestCollectionRangeSearch(TestcaseBase): "ids": [], "limit": 0}) # 4. range search with IP - range_search_params = {"metric_type": "IP", "params": {"nprobe": 10, "radius": 1}} + range_search_params = {"metric_type": "IP", "params": {"nprobe": 10, "radius": 0}} collection_w.search(vectors[:default_nq], default_search_field, range_search_params, default_limit, default_search_exp, check_task=CheckTasks.check_search_results, check_items={"nq": default_nq, - "ids": [], - "limit": 0}) + "ids": insert_ids, + "limit": default_limit}) @pytest.mark.tags(CaseLabel.L2) def test_range_search_radius_range_filter_not_in_params(self):