提交 ba362567 编写于 作者: Z zhenwu

assert failed if create index with pq on ip_table

上级 1d9e030c
...@@ -636,10 +636,7 @@ class TestIndexIP: ...@@ -636,10 +636,7 @@ class TestIndexIP:
top_k = 5 top_k = 5
status, result = connect.search_vectors(ip_table, top_k, nprobe, query_vecs) status, result = connect.search_vectors(ip_table, top_k, nprobe, query_vecs)
logging.getLogger().info(result) logging.getLogger().info(result)
if index_params["index_type"] == IndexType.IVF_PQ: assert status.OK()
assert not status.OK()
else:
assert status.OK()
assert len(result) == len(query_vecs) assert len(result) == len(query_vecs)
# TODO: enable # TODO: enable
...@@ -975,9 +972,12 @@ class TestIndexIP: ...@@ -975,9 +972,12 @@ class TestIndexIP:
expected: return code 0, and default index param expected: return code 0, and default index param
''' '''
index_params = get_simple_index_params index_params = get_simple_index_params
status, ids = connect.add_vectors(ip_table, vectors) # status, ids = connect.add_vectors(ip_table, vectors)
status = connect.create_index(ip_table, index_params) status = connect.create_index(ip_table, index_params)
assert status.OK() if index_params["index_type"] == IndexType.IVF_PQ:
assert not status.OK()
else:
assert status.OK()
status, result = connect.describe_index(ip_table) status, result = connect.describe_index(ip_table)
logging.getLogger().info(result) logging.getLogger().info(result)
status = connect.drop_index(ip_table) status = connect.drop_index(ip_table)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册