Skip to content

Commit

Permalink
test: [cherry-pick] change the number of insertion vectors (#34015)
Browse files Browse the repository at this point in the history
pr: #34014

Signed-off-by: elstic <hao.wang@zilliz.com>
  • Loading branch information
elstic committed Jun 20, 2024
1 parent c28b693 commit e0e2ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion tests/python_client/testcases/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ def test_collection_multi_sparse_vectors(self):
# 2. create collection with multiple vectors
c_name = cf.gen_unique_str(prefix)
fields = [cf.gen_int64_field(is_primary=True), cf.gen_float_field(),
cf.gen_float_vec_field(vector_data_type=ct.sparse_vector_data_type), cf.gen_float_vec_field(name="tmp", vector_data_type=sparse_vector_data_type)]
cf.gen_float_vec_field(vector_data_type=ct.sparse_vector), cf.gen_float_vec_field(name="vec_sparse", vector_data_type=ct.sparse_vector)]
schema = cf.gen_collection_schema(fields=fields)
self.collection_wrap.init_collection(c_name, schema=schema,
check_task=CheckTasks.check_collection_property,
Expand Down
13 changes: 4 additions & 9 deletions tests/python_client/testcases/test_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -12634,11 +12634,6 @@ def test_hybrid_search_sparse_normal(self):
search_res = collection_w.search(vector, vector_name_list[i],
default_search_params, default_limit,
default_search_exp,
check_task=CheckTasks.check_search_results,
check_items={"nq": 1,
"ids": insert_ids,
# "limit": default_limit
}
)[0]
ids = search_res[0].ids
for j in range(len(ids)):
Expand Down Expand Up @@ -12673,7 +12668,7 @@ def test_sparse_index_search(self, index):
c_name = cf.gen_unique_str(prefix)
schema = cf.gen_default_sparse_schema(auto_id=False)
collection_w, _ = self.collection_wrap.init_collection(c_name, schema=schema)
data = cf.gen_default_list_sparse_data(nb=10000)
data = cf.gen_default_list_sparse_data(nb=4000)
collection_w.insert(data)
params = cf.get_index_params_params(index)
index_params = {"index_type": index, "metric_type": "IP", "params": params}
Expand Down Expand Up @@ -12767,7 +12762,7 @@ def test_search_sparse_ratio(self, ratio, index):
c_name = cf.gen_unique_str(prefix)
schema = cf.gen_default_sparse_schema(auto_id=False)
collection_w, _ = self.collection_wrap.init_collection(c_name, schema=schema)
data = cf.gen_default_list_sparse_data(nb=10000)
data = cf.gen_default_list_sparse_data(nb=4000)
collection_w.insert(data)
params = {"index_type": index, "metric_type": "IP", "params": {"drop_ratio_build": ratio}}
collection_w.create_index(ct.default_sparse_vec_field_name, params, index_name=index)
Expand All @@ -12792,7 +12787,7 @@ def test_sparse_vector_search_output_field(self, index):
c_name = cf.gen_unique_str(prefix)
schema = cf.gen_default_sparse_schema()
collection_w, _ = self.collection_wrap.init_collection(c_name, schema=schema)
data = cf.gen_default_list_sparse_data(nb=10000)
data = cf.gen_default_list_sparse_data(nb=4000)
collection_w.insert(data)
params = cf.get_index_params_params(index)
index_params = {"index_type": index, "metric_type": "IP", "params": params}
Expand Down Expand Up @@ -12821,7 +12816,7 @@ def test_sparse_vector_search_iterator(self, index):
c_name = cf.gen_unique_str(prefix)
schema = cf.gen_default_sparse_schema()
collection_w, _ = self.collection_wrap.init_collection(c_name, schema=schema)
data = cf.gen_default_list_sparse_data(nb=10000)
data = cf.gen_default_list_sparse_data(nb=4000)
collection_w.insert(data)
params = cf.get_index_params_params(index)
index_params = {"index_type": index, "metric_type": "IP", "params": params}
Expand Down

0 comments on commit e0e2ed0

Please sign in to comment.