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

Update field name (#3970)

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

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

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

* [skip ci] fix config case
Signed-off-by: Nzw <zw@milvus.io>
Co-authored-by: Nzw <zw@milvus.io>
上级 39c533bc
......@@ -584,9 +584,9 @@ class TestGetBase:
# logging.getLogger().info(current_thread().getName() + " insert")
for group_vector in group_vectors:
group_entities = [
{"field": "int64", "type": DataType.INT64, "values": [i for i in range(step)]},
{"field": "float", "type": DataType.FLOAT, "values": [float(i) for i in range(step)]},
{"field": default_float_vec_field_name, "type": DataType.FLOAT_VECTOR, "values": group_vector}
{"name": "int64", "type": DataType.INT64, "values": [i for i in range(step)]},
{"name": "float", "type": DataType.FLOAT, "values": [float(i) for i in range(step)]},
{"name": default_float_vec_field_name, "type": DataType.FLOAT_VECTOR, "values": group_vector}
]
group_ids = connect.insert(collection, group_entities)
connect.flush([collection])
......
......@@ -216,7 +216,7 @@ class TestSearchBase:
nq = get_nq
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
entities, ids = init_data(connect, collection)
connect.create_index(collection, field_name, get_simple_index)
......@@ -260,7 +260,7 @@ class TestSearchBase:
nq = get_nq
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, default_tag)
entities, ids = init_data(connect, collection)
......@@ -290,7 +290,7 @@ class TestSearchBase:
nq = get_nq
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, default_tag)
entities, ids = init_data(connect, collection, partition_tags=default_tag)
......@@ -338,7 +338,7 @@ class TestSearchBase:
nq = 2
new_tag = "new_tag"
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, default_tag)
connect.create_partition(collection, new_tag)
......@@ -372,7 +372,7 @@ class TestSearchBase:
tag = "tag"
new_tag = "new_tag"
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, tag)
connect.create_partition(collection, new_tag)
......@@ -427,7 +427,7 @@ class TestSearchBase:
nq = get_nq
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
entities, ids = init_data(connect, collection)
get_simple_index["metric_type"] = "IP"
......@@ -455,7 +455,7 @@ class TestSearchBase:
nq = get_nq
metric_type = "IP"
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, default_tag)
entities, ids = init_data(connect, collection)
......@@ -488,7 +488,7 @@ class TestSearchBase:
metric_type = "IP"
new_tag = "new_tag"
index_type = get_simple_index["index_type"]
if index_type == "IVF_PQ":
if index_type in skip_pq():
pytest.skip("Skip PQ")
connect.create_partition(collection, default_tag)
connect.create_partition(collection, new_tag)
......
......@@ -79,6 +79,10 @@ def ivf():
return ["FLAT", "IVF_FLAT", "IVF_SQ8", "IVF_SQ8_HYBRID", "IVF_PQ"]
def skip_pq():
return ["IVF_PQ", "RHNSW_PQ", "RHNSW_SQ"]
def binary_metrics():
return ["JACCARD", "HAMMING", "TANIMOTO", "SUBSTRUCTURE", "SUPERSTRUCTURE"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册