Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
c71bc190
M
milvus
项目概览
milvus
/
milvus
大约 1 年 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c71bc190
编写于
4月 04, 2023
作者:
B
binbin
提交者:
GitHub
4月 04, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add timeout for CI verification (#23201)
Signed-off-by:
N
Binbin Lv
<
binbin.lv@zilliz.com
>
上级
7da870f5
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
34 deletion
+33
-34
tests/python_client/common/common_type.py
tests/python_client/common/common_type.py
+2
-2
tests/python_client/testcases/test_search.py
tests/python_client/testcases/test_search.py
+31
-32
未找到文件。
tests/python_client/common/common_type.py
浏览文件 @
c71bc190
...
...
@@ -182,11 +182,11 @@ get_wrong_format_dict = [
]
""" Specially defined list """
all_index_types
=
[
"FLAT"
,
"IVF_FLAT"
,
"IVF_SQ8"
,
"IVF_PQ"
,
"HNSW"
,
"
ANNOY"
,
"
DISKANN"
,
"BIN_FLAT"
,
"BIN_IVF_FLAT"
,
all_index_types
=
[
"FLAT"
,
"IVF_FLAT"
,
"IVF_SQ8"
,
"IVF_PQ"
,
"HNSW"
,
"DISKANN"
,
"BIN_FLAT"
,
"BIN_IVF_FLAT"
,
"RAFT_IVF_FLAT"
,
"RAFT_IVF_PQ"
]
default_index_params
=
[{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
,
"m"
:
16
,
"nbits"
:
8
},
{
"M"
:
48
,
"efConstruction"
:
500
},
{
"n_trees"
:
50
},
{
},
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"M"
:
48
,
"efConstruction"
:
500
},
{},
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
,
"m"
:
16
,
"nbits"
:
8
}]
Handler_type
=
[
"GRPC"
,
"HTTP"
]
...
...
tests/python_client/testcases/test_search.py
浏览文件 @
c71bc190
...
...
@@ -40,10 +40,8 @@ default_bool_field_name = ct.default_bool_field_name
default_string_field_name
=
ct
.
default_string_field_name
default_index_params
=
{
"index_type"
:
"IVF_SQ8"
,
"metric_type"
:
"L2"
,
"params"
:
{
"nlist"
:
64
}}
vectors
=
[[
random
.
random
()
for
_
in
range
(
default_dim
)]
for
_
in
range
(
default_nq
)]
range_search_supported_index
=
ct
.
all_index_types
[:
5
]
range_search_supported_index
.
append
(
ct
.
all_index_types
[
6
])
range_search_supported_index_params
=
ct
.
default_index_params
[:
5
]
range_search_supported_index_params
.
append
(
ct
.
default_index_params
[
6
])
range_search_supported_index
=
ct
.
all_index_types
[:
6
]
range_search_supported_index_params
=
ct
.
default_index_params
[:
6
]
uid
=
"test_search"
nq
=
1
epsilon
=
0.001
...
...
@@ -311,8 +309,8 @@ class TestCollectionSearchInvalid(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L1
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_invalid_params_type
(
self
,
index
,
params
):
"""
target: test search with invalid search params
...
...
@@ -720,8 +718,8 @@ class TestCollectionSearchInvalid(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L1
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[
1
:
6
],
ct
.
default_index_params
[
1
:
6
]))
zip
(
ct
.
all_index_types
[
1
:
5
],
ct
.
default_index_params
[
1
:
5
]))
def
test_search_different_index_invalid_params
(
self
,
index
,
params
):
"""
target: test search with different index
...
...
@@ -1034,6 +1032,7 @@ class TestCollectionSearchInvalid(TestcaseBase):
"err_msg"
:
f
"range_filter must more than radius when IP"
})
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
skip
(
reason
=
"annoy not supported any more"
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[
5
:
5
],
ct
.
default_index_params
[
5
:
5
]))
...
...
@@ -1758,8 +1757,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_after_different_index_with_params
(
self
,
dim
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search after different index
...
...
@@ -1798,8 +1797,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[
9
:
10
],
ct
.
default_index_params
[
9
:
10
]))
zip
(
ct
.
all_index_types
[
8
:
10
],
ct
.
default_index_params
[
8
:
10
]))
def
test_search_after_different_index_with_params_gpu
(
self
,
dim
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search after different index
...
...
@@ -1839,8 +1838,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
zip
(
ct
.
all_index_types
[:
5
],
ct
.
default_index_params
[:
5
]))
def
test_search_after_different_index_with_min_dim
(
self
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search after different index with min dim
...
...
@@ -1877,8 +1876,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[
9
:
10
],
ct
.
default_index_params
[
9
:
10
]))
zip
(
ct
.
all_index_types
[
8
:
10
],
ct
.
default_index_params
[
8
:
10
]))
def
test_search_after_different_index_with_min_dim_gpu
(
self
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search after different index with min dim
...
...
@@ -1916,8 +1915,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_after_index_different_metric_type
(
self
,
dim
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search with different metric type
...
...
@@ -1958,8 +1957,8 @@ class TestCollectionSearch(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
GPU
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[
9
:
10
],
ct
.
default_index_params
[
9
:
10
]))
zip
(
ct
.
all_index_types
[
8
:
10
],
ct
.
default_index_params
[
8
:
10
]))
def
test_search_after_index_different_metric_type_gpu
(
self
,
dim
,
index
,
params
,
auto_id
,
_async
):
"""
target: test search with different metric type
...
...
@@ -3417,8 +3416,8 @@ class TestSearchBase(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_index_empty_partition
(
self
,
index
,
params
):
"""
target: test basic search function, all the search params are correct, test all index params, and build
...
...
@@ -3466,8 +3465,8 @@ class TestSearchBase(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_index_partitions
(
self
,
index
,
params
,
get_top_k
):
"""
target: test basic search function, all the search params are correct, test all index params, and build
...
...
@@ -3526,8 +3525,8 @@ class TestSearchBase(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_ip_after_index
(
self
,
index
,
params
):
"""
target: test basic search function, all the search params are correct, test all index params, and build
...
...
@@ -3583,8 +3582,8 @@ class TestSearchBase(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_ip_index_empty_partition
(
self
,
index
,
params
):
"""
target: test basic search function, all the search params are correct, test all index params, and build
...
...
@@ -3626,8 +3625,8 @@ class TestSearchBase(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_ip_index_partitions
(
self
,
index
,
params
):
"""
target: test basic search function, all the search params are correct, test all index params, and build
...
...
@@ -4618,8 +4617,8 @@ class TestSearchPagination(TestcaseBase):
@
pytest
.
mark
.
tags
(
CaseLabel
.
L2
)
@
pytest
.
mark
.
parametrize
(
"index, params"
,
zip
(
ct
.
all_index_types
[:
7
],
ct
.
default_index_params
[:
7
]))
zip
(
ct
.
all_index_types
[:
6
],
ct
.
default_index_params
[:
6
]))
def
test_search_pagination_after_different_index
(
self
,
index
,
params
,
auto_id
,
offset
,
_async
):
"""
target: test search pagination after different index
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录