Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
ab859eff
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,发现更多精彩内容 >>
提交
ab859eff
编写于
3月 17, 2021
作者:
T
ThreadDao
提交者:
yefu.chen
3月 17, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix insert and add index
Signed-off-by:
N
ThreadDao
<
yufen.zong@zilliz.com
>
上级
4b0210d7
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
5 deletion
+10
-5
tests/python_test/entity/test_insert.py
tests/python_test/entity/test_insert.py
+3
-5
tests/python_test/test_index.py
tests/python_test/test_index.py
+7
-0
未找到文件。
tests/python_test/entity/test_insert.py
浏览文件 @
ab859eff
...
...
@@ -746,7 +746,6 @@ class TestInsertAsync:
stats
=
connect
.
get_collection_stats
(
collection
)
assert
stats
[
row_count
]
==
0
# #1339
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_insert_async_invalid_params
(
self
,
connect
):
'''
...
...
@@ -770,6 +769,7 @@ class TestInsertAsync:
'''
entities
=
[]
future
=
connect
.
insert
(
collection
,
entities
,
_async
=
True
)
future
.
done
()
with
pytest
.
raises
(
Exception
)
as
e
:
future
.
result
()
...
...
@@ -1128,12 +1128,11 @@ class TestInsertInvalidBinary(object):
connect
.
insert
(
binary_collection
,
tmp_entity
)
@
pytest
.
mark
.
level
(
2
)
# #1352
@
pytest
.
mark
.
tags
(
"fail"
)
@
pytest
.
mark
.
tags
(
"0331"
)
def
test_insert_with_invalid_field_entity_value
(
self
,
connect
,
binary_collection
,
get_field_vectors_value
):
tmp_entity
=
copy
.
deepcopy
(
default_binary_entity
)
src_vectors
=
tmp_entity
[
-
1
][
"values"
]
src_vectors
[
0
]
[
1
]
=
get_field_vectors_value
src_vectors
[
0
]
=
get_field_vectors_value
with
pytest
.
raises
(
Exception
):
connect
.
insert
(
binary_collection
,
tmp_entity
)
...
...
@@ -1160,7 +1159,6 @@ class TestInsertInvalidBinary(object):
@
pytest
.
mark
.
level
(
2
)
@
pytest
.
mark
.
tags
(
"0331"
)
# TODO 'bytes' object does not support item assignment
def
test_insert_with_invalid_field_entities_value
(
self
,
connect
,
binary_collection
,
get_field_vectors_value
):
tmp_entities
=
copy
.
deepcopy
(
default_binary_entities
)
src_vector
=
tmp_entities
[
-
1
][
"values"
]
...
...
tests/python_test/test_index.py
浏览文件 @
ab859eff
...
...
@@ -557,6 +557,13 @@ class TestIndexBase:
connect
.
create_index
(
collection
,
field_name
,
get_simple_index
)
connect
.
drop_index
(
collection
,
field_name
)
def
test_create_PQ_without_nbits
(
self
,
connect
,
collection
):
PQ_index
=
{
"index_type"
:
"IVF_PQ"
,
"params"
:
{
"nlist"
:
128
,
"m"
:
16
},
"metric_type"
:
"L2"
}
ids
=
connect
.
insert
(
collection
,
default_entities
)
connect
.
create_index
(
collection
,
field_name
,
PQ_index
)
index
=
connect
.
describe_index
(
collection
,
field_name
)
assert
index
==
PQ_index
class
TestIndexBinary
:
@
pytest
.
fixture
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录