Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
fbbb384f
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看板
提交
fbbb384f
编写于
8月 11, 2020
作者:
B
barriery
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix codestyle
上级
d90be905
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
11 deletion
+16
-11
doc/PIPELINE_SERVING.md
doc/PIPELINE_SERVING.md
+1
-0
doc/PIPELINE_SERVING_CN.md
doc/PIPELINE_SERVING_CN.md
+1
-0
python/pipeline/operator.py
python/pipeline/operator.py
+7
-6
python/pipeline/pipeline_server.py
python/pipeline/pipeline_server.py
+4
-3
python/pipeline/profiler.py
python/pipeline/profiler.py
+3
-2
未找到文件。
doc/PIPELINE_SERVING.md
浏览文件 @
fbbb384f
...
...
@@ -47,6 +47,7 @@ The graph execution engine consists of OPs and Channels, and the connected OPs s
</center>
### Extreme Case Consideration
-
Request timeout
...
...
doc/PIPELINE_SERVING_CN.md
浏览文件 @
fbbb384f
...
...
@@ -6,6 +6,7 @@ Paddle Serving 通常用于单模型的一键部署,但端到端的深度学
Paddle Serving 提供了用户友好的多模型组合服务编程框架,Pipeline Serving,旨在降低编程门槛,提高资源使用率(尤其是GPU设备),提升整体的预估效率。
## 整体架构设计
Server端基于 gRPC 和图执行引擎构建,两者的关系如下图所示。
...
...
python/pipeline/operator.py
浏览文件 @
fbbb384f
...
...
@@ -364,9 +364,9 @@ class Op(object):
input_offset
.
append
(
offset
)
else
:
_LOGGER
.
critical
(
"{} Failed to process: expect input type is dict(sample"
" input) or list(batch input), but get {}"
.
format
(
op_info_prefix
,
type
(
one_input
)))
"{} Failed to process: expect input type is dict(sample"
" input) or list(batch input), but get {}"
.
format
(
op_info_prefix
,
type
(
one_input
)))
os
.
_exit
(
-
1
)
midped_batch
=
None
...
...
@@ -434,10 +434,10 @@ class Op(object):
typical_logid
,
op_info_prefix
,
name
))
lod_var_names
.
add
(
name
)
lod_offset_names
.
add
(
lod_offset_name
)
for
idx
,
data_id
in
enumerate
(
data_ids
):
midped_data_dict
[
data_id
]
=
{}
for
name
,
value
in
midped_batch
.
items
():
if
name
in
lod_offset_names
:
continue
...
...
@@ -450,7 +450,8 @@ class Op(object):
data_offset_right
=
input_offset
[
idx
+
1
]
lod_offset_left
=
lod_offset
[
data_offset_left
]
lod_offset_right
=
lod_offset
[
data_offset_right
]
midped_data_dict
[
data_id
][
name
]
=
value
[
lod_offset_left
:
lod_offset_right
]
midped_data_dict
[
data_id
][
name
]
=
value
[
lod_offset_left
:
lod_offset_right
]
midped_data_dict
[
data_id
][
lod_offset_name
]
=
\
lod_offset
[
data_offset_left
:
data_offset_right
+
1
]
-
lod_offset
[
data_offset_left
]
else
:
...
...
python/pipeline/pipeline_server.py
浏览文件 @
fbbb384f
...
...
@@ -117,7 +117,8 @@ class PipelineServer(object):
server
=
grpc
.
server
(
futures
.
ThreadPoolExecutor
(
max_workers
=
self
.
_worker_num
),
options
=
[(
'grpc.max_send_message_length'
,
256
*
1024
*
1024
),
(
'grpc.max_receive_message_length'
,
256
*
1024
*
1024
)])
(
'grpc.max_receive_message_length'
,
256
*
1024
*
1024
)
])
pipeline_service_pb2_grpc
.
add_PipelineServiceServicer_to_server
(
PipelineServicer
(
self
.
_response_op
,
self
.
_conf
),
server
)
server
.
add_insecure_port
(
'[::]:{}'
.
format
(
self
.
_port
))
...
...
@@ -126,8 +127,8 @@ class PipelineServer(object):
def
_run_server_func
(
self
,
bind_address
,
response_op
,
dag_conf
,
worker_idx
):
options
=
[(
'grpc.so_reuseport'
,
1
),
(
'grpc.max_send_message_length'
,
256
*
1024
*
1024
),
(
'grpc.max_send_message_length'
,
256
*
1024
*
1024
)]
(
'grpc.max_send_message_length'
,
256
*
1024
*
1024
),
(
'grpc.max_send_message_length'
,
256
*
1024
*
1024
)]
server
=
grpc
.
server
(
futures
.
ThreadPoolExecutor
(
max_workers
=
1
,
),
options
=
options
)
...
...
python/pipeline/profiler.py
浏览文件 @
fbbb384f
...
...
@@ -89,7 +89,7 @@ class PerformanceTracer(object):
if
not
succ
:
err_count
+=
1
err_request
.
append
(
req_id
)
if
name
not
in
op_cost
:
op_cost
[
name
]
=
{}
...
...
@@ -130,7 +130,8 @@ class PerformanceTracer(object):
_LOGGER
.
info
(
"
\t
Query count[{}]"
.
format
(
tot
))
_LOGGER
.
info
(
"
\t
QPS[{} q/s]"
.
format
(
qps
))
_LOGGER
.
info
(
"
\t
Succ[{}]"
.
format
(
1
-
1.0
*
err_count
/
tot
))
_LOGGER
.
info
(
"
\t
Error req[{}]"
.
format
(
", "
.
join
([
str
(
x
)
for
x
in
err_request
)]))
_LOGGER
.
info
(
"
\t
Error req[{}]"
.
format
(
", "
.
join
(
[
str
(
x
)
for
x
in
err_request
])))
_LOGGER
.
info
(
"
\t
Latency:"
)
_LOGGER
.
info
(
"
\t\t
ave[{} ms]"
.
format
(
ave_cost
))
for
latency
in
latencys
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录