Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
8a42c875
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
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,发现更多精彩内容 >>
提交
8a42c875
编写于
11月 20, 2019
作者:
F
fishpenguin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Query API in customization still uses old version
上级
a176eb94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
41 deletion
+13
-41
CHANGELOG.md
CHANGELOG.md
+1
-0
core/src/scheduler/action/PushTaskToNeighbour.cpp
core/src/scheduler/action/PushTaskToNeighbour.cpp
+0
-35
core/unittest/db/test_db.cpp
core/unittest/db/test_db.cpp
+12
-6
未找到文件。
CHANGELOG.md
浏览文件 @
8a42c875
...
...
@@ -13,6 +13,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
\#
353 - Rename config.h.in to version.h.in
-
\#
374 - sdk_simple return empty result
-
\#
397 - sdk_simple return incorrect result
-
\#
440 - Query API in customization still uses old version
## Feature
-
\#
12 - Pure CPU version for Milvus
...
...
core/src/scheduler/action/PushTaskToNeighbour.cpp
浏览文件 @
8a42c875
...
...
@@ -106,41 +106,6 @@ Action::SpecifiedResourceLabelTaskScheduler(const ResourceMgrPtr& res_mgr, Resou
std
::
shared_ptr
<
LoadCompletedEvent
>
event
)
{
auto
task_item
=
event
->
task_table_item_
;
auto
task
=
event
->
task_table_item_
->
task
;
// if (resource->type() == ResourceType::DISK) {
// // step 1: calculate shortest path per resource, from disk to compute resource
// auto compute_resources = res_mgr->GetComputeResources();
// std::vector<std::vector<std::string>> paths;
// std::vector<uint64_t> transport_costs;
// for (auto& res : compute_resources) {
// std::vector<std::string> path;
// uint64_t transport_cost = ShortestPath(resource, res, res_mgr, path);
// transport_costs.push_back(transport_cost);
// paths.emplace_back(path);
// }
// if (task->job_.lock()->type() == JobType::BUILD) {
// // step2: Read device id in config
// // get build index gpu resource
// server::Config& config = server::Config::GetInstance();
// int32_t build_index_gpu;
// Status stat = config.GetResourceConfigIndexBuildDevice(build_index_gpu);
//
// bool find_gpu_res = false;
// if (res_mgr->GetResource(ResourceType::GPU, build_index_gpu) != nullptr) {
// for (uint64_t i = 0; i < compute_resources.size(); ++i) {
// if (compute_resources[i]->name() ==
// res_mgr->GetResource(ResourceType::GPU, build_index_gpu)->name()) {
// find_gpu_res = true;
// Path task_path(paths[i], paths[i].size() - 1);
// task->path() = task_path;
// break;
// }
// }
// }
// if (not find_gpu_res) {
// task->path() = Path(paths[0], paths[0].size() - 1);
// }
// }
// }
if
(
resource
->
name
()
==
task
->
path
().
Last
())
{
resource
->
WakeupExecutor
();
...
...
core/unittest/db/test_db.cpp
浏览文件 @
8a42c875
...
...
@@ -305,24 +305,30 @@ TEST_F(DBTest, SEARCH_TEST) {
// test FAISS_IVFSQ8H optimizer
index
.
engine_type_
=
(
int
)
milvus
::
engine
::
EngineType
::
FAISS_IVFSQ8H
;
db_
->
CreateIndex
(
TABLE_NAME
,
index
);
// wait until build index finish
std
::
vector
<
std
::
string
>
partition_tag
;
milvus
::
engine
::
ResultIds
result_ids
;
milvus
::
engine
::
ResultDistances
result_dists
;
{
milvus
::
engine
::
QueryResults
results
;
stat
=
db_
->
Query
(
TABLE_NAME
,
k
,
nq
,
10
,
xq
.
data
(),
results
);
result_ids
.
clear
();
result_dists
.
clear
();
stat
=
db_
->
Query
(
TABLE_NAME
,
partition_tag
,
k
,
nq
,
10
,
xq
.
data
(),
result_ids
,
result_dists
);
ASSERT_TRUE
(
stat
.
ok
());
}
{
milvus
::
engine
::
QueryResults
large_nq_results
;
stat
=
db_
->
Query
(
TABLE_NAME
,
k
,
200
,
10
,
xq
.
data
(),
large_nq_results
);
result_ids
.
clear
();
result_dists
.
clear
();
stat
=
db_
->
Query
(
TABLE_NAME
,
partition_tag
,
k
,
200
,
10
,
xq
.
data
(),
result_ids
,
result_dists
);
ASSERT_TRUE
(
stat
.
ok
());
}
{
// search by specify index file
milvus
::
engine
::
meta
::
DatesT
dates
;
std
::
vector
<
std
::
string
>
file_ids
=
{
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
};
milvus
::
engine
::
QueryResults
results
;
stat
=
db_
->
Query
(
TABLE_NAME
,
file_ids
,
k
,
nq
,
10
,
xq
.
data
(),
dates
,
results
);
result_ids
.
clear
();
result_dists
.
clear
();
stat
=
db_
->
QueryByFileID
(
TABLE_NAME
,
file_ids
,
k
,
nq
,
10
,
xq
.
data
(),
dates
,
result_ids
,
result_dists
);
ASSERT_TRUE
(
stat
.
ok
());
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录