Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
ffd8d3d7
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看板
提交
ffd8d3d7
编写于
6月 18, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add brpc_predict_error in proto
上级
41f1570e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
14 addition
and
4 deletion
+14
-4
python/paddle_serving_client/__init__.py
python/paddle_serving_client/__init__.py
+2
-0
python/paddle_serving_server/__init__.py
python/paddle_serving_server/__init__.py
+6
-2
python/paddle_serving_server_gpu/__init__.py
python/paddle_serving_server_gpu/__init__.py
+6
-2
未找到文件。
python/paddle_serving_client/__init__.py
浏览文件 @
ffd8d3d7
...
@@ -501,6 +501,8 @@ class MultiLangClient(object):
...
@@ -501,6 +501,8 @@ class MultiLangClient(object):
def
_unpack_resp
(
self
,
resp
,
fetch
,
is_python
,
need_variant_tag
):
def
_unpack_resp
(
self
,
resp
,
fetch
,
is_python
,
need_variant_tag
):
tag
=
resp
.
tag
tag
=
resp
.
tag
if
resp
.
brpc_predict_error
:
return
None
if
not
need_variant_tag
else
[
None
,
tag
]
multi_result_map
=
{}
multi_result_map
=
{}
for
model_result
in
resp
.
outputs
:
for
model_result
in
resp
.
outputs
:
inst
=
model_result
.
insts
[
0
]
inst
=
model_result
.
insts
[
0
]
...
...
python/paddle_serving_server/__init__.py
浏览文件 @
ffd8d3d7
...
@@ -518,9 +518,14 @@ class MultiLangServerService(
...
@@ -518,9 +518,14 @@ class MultiLangServerService(
return
feed_batch
,
fetch_names
,
is_python
return
feed_batch
,
fetch_names
,
is_python
def
_pack_resp_package
(
self
,
results
,
fetch_names
,
is_python
,
tag
):
def
_pack_resp_package
(
self
,
results
,
fetch_names
,
is_python
,
tag
):
resp
=
multi_lang_general_model_service_pb2
.
Response
()
resp
.
tag
=
tag
if
results
is
None
:
resp
.
brpc_predict_error
=
True
return
resp
.
brpc_predict_error
=
False
if
not
self
.
is_multi_model_
:
if
not
self
.
is_multi_model_
:
results
=
{
'general_infer_0'
:
results
}
results
=
{
'general_infer_0'
:
results
}
resp
=
multi_lang_general_model_service_pb2
.
Response
()
for
model_name
,
model_result
in
results
.
items
():
for
model_name
,
model_result
in
results
.
items
():
model_output
=
multi_lang_general_model_service_pb2
.
ModelOutput
()
model_output
=
multi_lang_general_model_service_pb2
.
ModelOutput
()
inst
=
multi_lang_general_model_service_pb2
.
FetchInst
()
inst
=
multi_lang_general_model_service_pb2
.
FetchInst
()
...
@@ -546,7 +551,6 @@ class MultiLangServerService(
...
@@ -546,7 +551,6 @@ class MultiLangServerService(
model_output
.
insts
.
append
(
inst
)
model_output
.
insts
.
append
(
inst
)
model_output
.
engine_name
=
model_name
model_output
.
engine_name
=
model_name
resp
.
outputs
.
append
(
model_output
)
resp
.
outputs
.
append
(
model_output
)
resp
.
tag
=
tag
return
resp
return
resp
def
inference
(
self
,
request
,
context
):
def
inference
(
self
,
request
,
context
):
...
...
python/paddle_serving_server_gpu/__init__.py
浏览文件 @
ffd8d3d7
...
@@ -567,9 +567,14 @@ class MultiLangServerService(
...
@@ -567,9 +567,14 @@ class MultiLangServerService(
return
feed_batch
,
fetch_names
,
is_python
return
feed_batch
,
fetch_names
,
is_python
def
_pack_resp_package
(
self
,
results
,
fetch_names
,
is_python
,
tag
):
def
_pack_resp_package
(
self
,
results
,
fetch_names
,
is_python
,
tag
):
resp
=
multi_lang_general_model_service_pb2
.
Response
()
resp
.
tag
=
tag
if
results
is
None
:
resp
.
brpc_predict_error
=
True
return
resp
.
brpc_predict_error
=
False
if
not
self
.
is_multi_model_
:
if
not
self
.
is_multi_model_
:
results
=
{
'general_infer_0'
:
results
}
results
=
{
'general_infer_0'
:
results
}
resp
=
multi_lang_general_model_service_pb2
.
Response
()
for
model_name
,
model_result
in
results
.
items
():
for
model_name
,
model_result
in
results
.
items
():
model_output
=
multi_lang_general_model_service_pb2
.
ModelOutput
()
model_output
=
multi_lang_general_model_service_pb2
.
ModelOutput
()
inst
=
multi_lang_general_model_service_pb2
.
FetchInst
()
inst
=
multi_lang_general_model_service_pb2
.
FetchInst
()
...
@@ -595,7 +600,6 @@ class MultiLangServerService(
...
@@ -595,7 +600,6 @@ class MultiLangServerService(
model_output
.
insts
.
append
(
inst
)
model_output
.
insts
.
append
(
inst
)
model_output
.
engine_name
=
model_name
model_output
.
engine_name
=
model_name
resp
.
outputs
.
append
(
model_output
)
resp
.
outputs
.
append
(
model_output
)
resp
.
tag
=
tag
return
resp
return
resp
def
inference
(
self
,
request
,
context
):
def
inference
(
self
,
request
,
context
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录