Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
0f3aa936
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
260
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,体验更适合开发者的 AI 搜索 >>
提交
0f3aa936
编写于
1月 08, 2021
作者:
Z
zhenshan.cao
提交者:
yefu.chen
1月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add create_index test for test_bulk_insert.py
Signed-off-by:
N
zhenshan.cao
<
zhenshan.cao@zilliz.com
>
上级
6a3ec57f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
7 addition
and
19 deletion
+7
-19
tests/python/requirements.txt
tests/python/requirements.txt
+1
-1
tests/python/test_bulk_insert.py
tests/python/test_bulk_insert.py
+2
-9
tests/python/test_insert.py
tests/python/test_insert.py
+0
-5
tests/python/utils.py
tests/python/utils.py
+4
-4
未找到文件。
tests/python/requirements.txt
浏览文件 @
0f3aa936
...
...
@@ -4,5 +4,5 @@ numpy==1.18.1
pytest==5.3.4
pytest-cov==2.8.1
pytest-timeout==1.3.4
pymilvus-distributed==0.0.1
0
pymilvus-distributed==0.0.1
4
sklearn==0.0
tests/python/test_bulk_insert.py
浏览文件 @
0f3aa936
...
...
@@ -101,7 +101,6 @@ class TestInsertBase:
connect
.
flush
([
collection
])
connect
.
drop_collection
(
collection
)
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_create_index
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -119,7 +118,6 @@ class TestInsertBase:
if
field
[
"name"
]
==
field_name
:
assert
field
[
"indexes"
][
0
]
==
get_simple_index
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_create_index_new
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -137,7 +135,6 @@ class TestInsertBase:
if
field
[
"name"
]
==
field_name
:
assert
field
[
"indexes"
][
0
]
==
get_simple_index
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_after_create_index
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -154,7 +151,6 @@ class TestInsertBase:
if
field
[
"name"
]
==
field_name
:
assert
field
[
"indexes"
][
0
]
==
get_simple_index
# @pytest.mark.skip(" later ")
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_search
(
self
,
connect
,
collection
):
'''
...
...
@@ -645,7 +641,6 @@ class TestInsertBinary:
connect
.
flush
([
binary_collection
])
assert
connect
.
count_entities
(
binary_collection
)
==
default_nb
@
pytest
.
mark
.
skip
(
"create index"
)
def
test_insert_binary_after_create_index
(
self
,
connect
,
binary_collection
,
get_binary_index
):
'''
target: test insert binary entities after build index
...
...
@@ -662,7 +657,6 @@ class TestInsertBinary:
if
field
[
"name"
]
==
binary_field_name
:
assert
field
[
"indexes"
][
0
]
==
get_binary_index
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_binary_create_index
(
self
,
connect
,
binary_collection
,
get_binary_index
):
'''
...
...
@@ -863,7 +857,6 @@ class TestInsertMultiCollections:
connect
.
flush
([
collection_name
])
assert
len
(
ids
)
==
1
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_create_index_insert_vector_another
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -877,7 +870,7 @@ class TestInsertMultiCollections:
ids
=
connect
.
bulk_insert
(
collection
,
default_entity
)
connect
.
drop_collection
(
collection_name
)
@
pytest
.
mark
.
skip
(
"c
reate index
"
)
@
pytest
.
mark
.
skip
(
"c
ount entities
"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_vector_create_index_another
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -892,7 +885,7 @@ class TestInsertMultiCollections:
count
=
connect
.
count_entities
(
collection_name
)
assert
count
==
0
@
pytest
.
mark
.
skip
(
"c
reate index
"
)
@
pytest
.
mark
.
skip
(
"c
ount entities
"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_vector_sleep_create_index_another
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
tests/python/test_insert.py
浏览文件 @
0f3aa936
...
...
@@ -101,7 +101,6 @@ class TestInsertBase:
connect
.
flush
([
collection
])
connect
.
drop_collection
(
collection
)
@
pytest
.
mark
.
skip
(
"create_index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_create_index
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -119,7 +118,6 @@ class TestInsertBase:
if
field
[
"name"
]
==
field_name
:
assert
field
[
"indexes"
][
0
]
==
get_simple_index
@
pytest
.
mark
.
skip
(
"create_index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_after_create_index
(
self
,
connect
,
collection
,
get_simple_index
):
'''
...
...
@@ -136,7 +134,6 @@ class TestInsertBase:
if
field
[
"name"
]
==
field_name
:
assert
field
[
"indexes"
][
0
]
==
get_simple_index
@
pytest
.
mark
.
skip
(
" todo fix search"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_search
(
self
,
connect
,
collection
):
'''
...
...
@@ -313,7 +310,6 @@ class TestInsertBinary:
connect
.
flush
([
binary_collection
])
assert
connect
.
count_entities
(
binary_collection
)
==
default_nb
@
pytest
.
mark
.
skip
(
"create index"
)
def
test_insert_binary_after_create_index
(
self
,
connect
,
binary_collection
,
get_binary_index
):
'''
target: test insert binary entities after build index
...
...
@@ -330,7 +326,6 @@ class TestInsertBinary:
if
field
[
"name"
]
==
binary_field_name
:
assert
field
[
"indexes"
][
0
]
==
get_binary_index
@
pytest
.
mark
.
skip
(
"create index"
)
@
pytest
.
mark
.
timeout
(
ADD_TIMEOUT
)
def
test_insert_binary_create_index
(
self
,
connect
,
binary_collection
,
get_binary_index
):
'''
...
...
tests/python/utils.py
浏览文件 @
0f3aa936
...
...
@@ -55,7 +55,7 @@ default_index_params = [
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
},
{
"nlist"
:
128
,
"m"
:
16
},
{
"nlist"
:
128
,
"m"
:
16
,
"nbits"
:
8
},
{
"M"
:
48
,
"efConstruction"
:
500
},
# {"search_length": 50, "out_degree": 40, "candidate_pool_size": 100, "knng": 50},
{
"n_trees"
:
50
},
...
...
@@ -281,9 +281,9 @@ def gen_entities(nb, is_normal=False):
def
gen_entities_new
(
nb
,
is_normal
=
False
):
vectors
=
gen_vectors
(
nb
,
default_dim
,
is_normal
)
entities
=
[
{
"name"
:
"int64"
,
"values"
:
[
i
for
i
in
range
(
nb
)]},
{
"name"
:
"float"
,
"values"
:
[
float
(
i
)
for
i
in
range
(
nb
)]},
{
"name"
:
default_float_vec_field_name
,
"values"
:
vectors
}
{
"name"
:
"int64"
,
"
type"
:
DataType
.
INT64
,
"
values"
:
[
i
for
i
in
range
(
nb
)]},
{
"name"
:
"float"
,
"
type"
:
DataType
.
FLOAT
,
"
values"
:
[
float
(
i
)
for
i
in
range
(
nb
)]},
{
"name"
:
default_float_vec_field_name
,
"
type"
:
DataType
.
FLOAT_VECTOR
,
"
values"
:
vectors
}
]
return
entities
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录