Merge pull request #536 from BossZou/0.6.0

(shards): python sdk test failed when test method add_vectors with partition
This commit is contained in:
Jin Hai 2019-11-26 20:10:47 +08:00 committed by GitHub
commit 69418f86fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View File

@ -26,7 +26,9 @@ Please mark all change in change log and use the ticket from JIRA.
- \#513 - Unittest DELETE_BY_RANGE sometimes failed
- \#527 - faiss benchmark not compatible with faiss 1.6.0
- \#530 - BuildIndex stop when do build index and search simultaneously
- \#532 - assigin value to `table_name` from confest shell
- \#533 - NSG build failed with MetricType Inner Product
- \#543 - client raise exception in shards when search results is empty
## Feature
- \#12 - Pure CPU version for Milvus
@ -35,6 +37,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#226 - Experimental shards middleware for Milvus
- \#227 - Support new index types SPTAG-KDT and SPTAG-BKT
- \#346 - Support build index with multiple gpu
- \#420 - Update shards merge part to match v0.5.3
- \#488 - Add log in scheduler/optimizer
- \#502 - C++ SDK support IVFPQ and SPTAG

View File

@ -61,6 +61,10 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
return status, [], []
row_num = files_collection.row_num
# row_num is equal to 0, result is empty
if not row_num:
continue
ids = files_collection.ids
diss = files_collection.distances # distance collections
# TODO: batch_len is equal to topk, may need to compare with topk
@ -322,7 +326,7 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer):
topk_result_list = milvus_pb2.TopKQueryResult(
status=status_pb2.Status(error_code=status.error_code,
reason=status.reason),
row_num=len(query_record_array),
row_num=len(id_results),
ids=id_results,
distances=dis_results)
return topk_result_list

View File

@ -1300,7 +1300,8 @@ class TestNameInvalid(object):
assert not status.OK()
@pytest.mark.level(2)
def test_add_vectors_with_invalid_tag_name(self, connect, get_tag_name):
def test_add_vectors_with_invalid_tag_name(self, connect, get_table_name, get_tag_name):
table_name = get_table_name
tag_name = get_tag_name
vectors = gen_vectors(1, dim)
status, result = connect.add_vectors(table_name, vectors, partition_tag=tag_name)

View File

@ -69,7 +69,7 @@ def gen_invalid_ips():
"\n",
"\t",
"中文",
"a".join("a" for i in range(256))
"a".join("a" for _ in range(256))
]
return ips
@ -116,7 +116,7 @@ def gen_invalid_uris():
"tcp:// :%s" % port,
# "tcp://123.0.0.1:%s" % port,
"tcp://127.0.0:%s" % port,
"tcp://255.0.0.0:%s" % port,
# "tcp://255.0.0.0:%s" % port,
# "tcp://255.255.0.0:%s" % port,
# "tcp://255.255.255.0:%s" % port,
# "tcp://255.255.255.255:%s" % port,