未验证 提交 3a584008 编写于 作者: D del-zhenwu 提交者: GitHub

Filter case (#2956)

* [skip ci] update search cases
Signed-off-by: Nzw <zw@milvus.io>

* update cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update cases
Signed-off-by: Nzw <zw@milvus.io>

* update cases
Signed-off-by: Nzw <zw@milvus.io>

* update index string
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update index params gen
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] fix cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] fix cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] fix cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update sq8h to cpu_not_support
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] assert entity is None entity not in collection
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] todo: check segment_size 1.0
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] change field name in cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] fix cases
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update list id in segment
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update casses
Signed-off-by: Nzw <zw@milvus.io>

* [skip ci] update index cases
Signed-off-by: Nzw <zw@milvus.io>
Co-authored-by: Nzw <zw@milvus.io>
上级 ab010f8f
......@@ -72,7 +72,7 @@ class TestMixBase:
p_create.join()
@pytest.mark.level(2)
def test_mix_multi_collections(self, connect):
def _test_mix_multi_collections(self, connect):
'''
target: test functions with multiple collections of different metric_types and index_types
method: create 60 collections which 30 are L2 and the other are IP, add vectors into them
......
......@@ -40,7 +40,7 @@ class TestCreateBase:
connect.create_partition(collection, tag)
@pytest.mark.level(3)
def test_create_partition_limit(self, connect, collection, args):
def _test_create_partition_limit(self, connect, collection, args):
'''
target: test create partitions, check status returned
method: call function: create_partition for 4097 times
......@@ -410,4 +410,4 @@ class TestNameInvalid(object):
collection_name = get_collection_name
connect.create_partition(collection, tag)
with pytest.raises(Exception) as e:
res = connect.list_partitions(collection_name)
\ No newline at end of file
res = connect.list_partitions(collection_name)
......@@ -575,7 +575,7 @@ def gen_invaild_search_params():
def gen_invalid_index():
index_params = []
for index_type in gen_invalid_index_types():
for index_type in gen_invalid_strs():
index_param = {"index_type": index_type, "params": {"nlist": 1024}}
index_params.append(index_param)
for nlist in gen_invalid_params():
......@@ -625,7 +625,7 @@ def gen_index():
index_params = []
for index_type in all_index_types:
if index_type == "FLAT":
if index_type in ["FLAT", "BIN_FLAT", "BIN_IVF_FLAT"]:
index_params.append({"index_type": index_type, "index_param": {"nlist": 1024}})
elif index_type in ["IVF_FLAT", "IVF_SQ8", "IVF_SQ8_HYBRID"]:
ivf_params = [{"index_type": index_type, "index_param": {"nlist": nlist}} \
......@@ -665,8 +665,18 @@ def gen_simple_index():
return index_params
def gen_binary_index():
index_params = []
for i in range(len(all_index_types)):
if all_index_types[i] in binary_support():
dic = {"index_type": all_index_types[i]}
dic.update(default_index_params[i])
index_params.append(dic)
return index_params
def get_search_param(index_type):
if index_type in ivf():
if index_type in ivf() or index_type in binary_support():
return {"nprobe": 32}
elif index_type == "HNSW":
return {"ef": 64}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册