Fix gen_vectors typo issue (#22117)

Signed-off-by: yanliang567 <yanliang.qiao@zilliz.com>
pull/22125/head
yanliang567 2023-02-10 17:12:32 +08:00 committed by GitHub
parent 9950cacd10
commit 2a19f4927d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -14,6 +14,8 @@ from utils.util_log import test_log as log
from common import common_func as cf from common import common_func as cf
from common import common_type as ct from common import common_type as ct
from pymilvus import ResourceGroupInfo
class Base: class Base:
""" Initialize class object """ """ Initialize class object """
@ -67,8 +69,8 @@ class Base:
""" Clean up the rgs before disconnect """ """ Clean up the rgs before disconnect """
for rg_name in self.resource_group_list: for rg_name in self.resource_group_list:
rg = self.utility_wrap.describe_resource_group(name=rg_name)[0] rg = self.utility_wrap.describe_resource_group(name=rg_name, check_task=ct.CheckTasks.check_nothing)[0]
if rg is not None: if isinstance(rg, ResourceGroupInfo):
if rg.num_available_node > 0: if rg.num_available_node > 0:
self.utility_wrap.transfer_node(source=rg_name, self.utility_wrap.transfer_node(source=rg_name,
target=ct.default_resource_group_name, target=ct.default_resource_group_name,

View File

@ -327,7 +327,7 @@ def gen_default_list_data(nb=ct.default_nb, dim=ct.default_dim, start=0):
int_values = [i for i in range(start, start + nb)] int_values = [i for i in range(start, start + nb)]
float_values = [np.float32(i) for i in range(start, start + nb)] float_values = [np.float32(i) for i in range(start, start + nb)]
string_values = [str(i) for i in range(start, start + nb)] string_values = [str(i) for i in range(start, start + nb)]
float_vec_values = gen_vectors(start + nb, dim) float_vec_values = gen_vectors(nb, dim)
data = [int_values, float_values, string_values, float_vec_values] data = [int_values, float_values, string_values, float_vec_values]
return data return data