Merge pull request #652 from del-zhenwu/0.6.0

assert failed if create index with pq on ip_table on gpu, assert pass on cpu
pull/661/head
Jin Hai 2019-12-02 17:13:18 +08:00 committed by GitHub
commit 99658064ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -972,9 +972,11 @@ class TestIndexIP:
expected: return code 0, and default index param
'''
index_params = get_simple_index_params
status, mode = connect._cmd("mode")
assert status.OK()
# status, ids = connect.add_vectors(ip_table, vectors)
status = connect.create_index(ip_table, index_params)
if index_params["index_type"] == IndexType.IVF_PQ:
if str(mode) == "GPU" and index_params["index_type"] == IndexType.IVF_PQ:
assert not status.OK()
else:
assert status.OK()