Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
2d73ac0a
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2d73ac0a
编写于
4月 13, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
make it run successful
上级
43d8782c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
13 deletion
+12
-13
core/general-client/include/general_model.h
core/general-client/include/general_model.h
+1
-1
core/general-client/src/pybind_general_model.cpp
core/general-client/src/pybind_general_model.cpp
+2
-2
core/general-server/op/general_response_op.cpp
core/general-server/op/general_response_op.cpp
+6
-7
python/paddle_serving_client/__init__.py
python/paddle_serving_client/__init__.py
+3
-3
未找到文件。
core/general-client/include/general_model.h
浏览文件 @
2d73ac0a
...
@@ -76,7 +76,7 @@ class PredictorRes {
...
@@ -76,7 +76,7 @@ class PredictorRes {
_variant_tag
=
variant_tag
;
_variant_tag
=
variant_tag
;
}
}
const
std
::
string
&
variant_tag
()
{
return
_variant_tag
;
}
const
std
::
string
&
variant_tag
()
{
return
_variant_tag
;
}
int
model
s
_num
()
{
return
_models
.
size
();}
int
model_num
()
{
return
_models
.
size
();}
std
::
vector
<
ModelRes
>
_models
;
std
::
vector
<
ModelRes
>
_models
;
...
...
core/general-client/src/pybind_general_model.cpp
浏览文件 @
2d73ac0a
...
@@ -42,8 +42,8 @@ PYBIND11_MODULE(serving_client, m) {
...
@@ -42,8 +42,8 @@ PYBIND11_MODULE(serving_client, m) {
py
::
return_value_policy
::
reference
)
py
::
return_value_policy
::
reference
)
.
def
(
"variant_tag"
,
.
def
(
"variant_tag"
,
[](
PredictorRes
&
self
)
{
return
self
.
variant_tag
();
})
[](
PredictorRes
&
self
)
{
return
self
.
variant_tag
();
})
.
def
(
"model
s
_num"
,
.
def
(
"model_num"
,
[](
PredictorRes
&
self
)
{
return
self
.
model
s
_num
();
});
[](
PredictorRes
&
self
)
{
return
self
.
model_num
();
});
py
::
class_
<
PredictorClient
>
(
m
,
"PredictorClient"
,
py
::
buffer_protocol
())
py
::
class_
<
PredictorClient
>
(
m
,
"PredictorClient"
,
py
::
buffer_protocol
())
.
def
(
py
::
init
())
.
def
(
py
::
init
())
...
...
core/general-server/op/general_response_op.cpp
浏览文件 @
2d73ac0a
...
@@ -66,14 +66,14 @@ int GeneralResponseOp::inference() {
...
@@ -66,14 +66,14 @@ int GeneralResponseOp::inference() {
}
}
const
GeneralBlob
*
input_blob
;
const
GeneralBlob
*
input_blob
;
for
(
uint32_t
i
=
0
;
i
<
pre_node_names
.
size
();
++
i
)
{
for
(
uint32_t
pi
=
0
;
pi
<
pre_node_names
.
size
();
++
p
i
)
{
VLOG
(
2
)
<<
"pre names["
<<
i
<<
"]: "
VLOG
(
2
)
<<
"pre names["
<<
p
i
<<
"]: "
<<
pre_node_names
[
i
]
<<
" ("
<<
pre_node_names
[
p
i
]
<<
" ("
<<
pre_node_names
.
size
()
<<
")"
;
<<
pre_node_names
.
size
()
<<
")"
;
input_blob
=
get_depend_argument
<
GeneralBlob
>
(
pre_node_names
[
i
]);
input_blob
=
get_depend_argument
<
GeneralBlob
>
(
pre_node_names
[
p
i
]);
fprintf
(
stderr
,
"input(%s) blob address %x
\n
"
,
pre_node_names
[
i
].
c_str
(),
input_blob
);
fprintf
(
stderr
,
"input(%s) blob address %x
\n
"
,
pre_node_names
[
p
i
].
c_str
(),
input_blob
);
if
(
!
input_blob
)
{
if
(
!
input_blob
)
{
LOG
(
ERROR
)
<<
"Failed mutable depended argument, op: "
<<
pre_node_names
[
0
];
LOG
(
ERROR
)
<<
"Failed mutable depended argument, op: "
<<
pre_node_names
[
pi
];
return
-
1
;
return
-
1
;
}
}
...
@@ -81,7 +81,6 @@ int GeneralResponseOp::inference() {
...
@@ -81,7 +81,6 @@ int GeneralResponseOp::inference() {
int
batch_size
=
input_blob
->
GetBatchSize
();
int
batch_size
=
input_blob
->
GetBatchSize
();
VLOG
(
2
)
<<
"input batch size: "
<<
batch_size
;
VLOG
(
2
)
<<
"input batch size: "
<<
batch_size
;
//TODO
ModelOutput
*
output
=
res
->
add_outputs
();
ModelOutput
*
output
=
res
->
add_outputs
();
for
(
int
i
=
0
;
i
<
batch_size
;
++
i
)
{
for
(
int
i
=
0
;
i
<
batch_size
;
++
i
)
{
FetchInst
*
fetch_inst
=
output
->
add_insts
();
FetchInst
*
fetch_inst
=
output
->
add_insts
();
...
...
python/paddle_serving_client/__init__.py
浏览文件 @
2d73ac0a
...
@@ -248,14 +248,14 @@ class Client(object):
...
@@ -248,14 +248,14 @@ class Client(object):
multi_result_map_batch
=
[]
multi_result_map_batch
=
[]
model_num
=
result_batch
.
model_num
()
model_num
=
result_batch
.
model_num
()
for
i
in
range
(
model_num
):
for
m
i
in
range
(
model_num
):
result_map_batch
=
[]
result_map_batch
=
[]
result_map
=
{}
result_map
=
{}
for
i
,
name
in
enumerate
(
fetch_names
):
for
i
,
name
in
enumerate
(
fetch_names
):
if
self
.
fetch_names_to_type_
[
name
]
==
int_type
:
if
self
.
fetch_names_to_type_
[
name
]
==
int_type
:
result_map
[
name
]
=
result_batch
.
get_int64_by_name
(
i
,
name
)
result_map
[
name
]
=
result_batch
.
get_int64_by_name
(
m
i
,
name
)
elif
self
.
fetch_names_to_type_
[
name
]
==
float_type
:
elif
self
.
fetch_names_to_type_
[
name
]
==
float_type
:
result_map
[
name
]
=
result_batch
.
get_float_by_name
(
i
,
name
)
result_map
[
name
]
=
result_batch
.
get_float_by_name
(
m
i
,
name
)
for
i
in
range
(
batch_size
):
for
i
in
range
(
batch_size
):
single_result
=
{}
single_result
=
{}
for
key
in
result_map
:
for
key
in
result_map
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录