Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
45de47bd
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看板
提交
45de47bd
编写于
7月 13, 2020
作者:
B
barrierye
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix profile in client
上级
b9a6afc7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
20 deletion
+20
-20
python/pipeline/channel.py
python/pipeline/channel.py
+3
-3
python/pipeline/dag.py
python/pipeline/dag.py
+3
-3
python/pipeline/operator.py
python/pipeline/operator.py
+14
-14
未找到文件。
python/pipeline/channel.py
浏览文件 @
45de47bd
...
...
@@ -90,12 +90,12 @@ class ChannelData(object):
self
.
ecode
=
ecode
self
.
error_info
=
error_info
self
.
client_need_profile
=
client_need_profile
self
.
profile_data_
list
=
[]
self
.
profile_data_
set
=
set
()
def
add_profile
(
self
,
profile_
lis
t
):
def
add_profile
(
self
,
profile_
se
t
):
if
self
.
client_need_profile
is
False
:
self
.
client_need_profile
=
True
self
.
profile_data_
list
.
extend
(
profile_list
)
self
.
profile_data_
set
|=
profile_set
@
staticmethod
def
check_dictdata
(
dictdata
):
...
...
python/pipeline/dag.py
浏览文件 @
45de47bd
...
...
@@ -241,9 +241,9 @@ class DAGExecutor(object):
# add profile info into rpc_resp
profile_value
=
""
if
resp_channeldata
.
client_need_profile
:
profile_
list
=
resp_channeldata
.
profile_data_lis
t
profile_
list
.
appen
d
(
profile_str
)
profile_value
=
""
.
join
(
profile_list
)
profile_
set
=
resp_channeldata
.
profile_data_se
t
profile_
set
.
ad
d
(
profile_str
)
profile_value
=
""
.
join
(
list
(
profile_set
)
)
rpc_resp
.
key
.
append
(
self
.
_client_profile_key
)
rpc_resp
.
value
.
append
(
profile_value
)
...
...
python/pipeline/operator.py
浏览文件 @
45de47bd
...
...
@@ -162,7 +162,7 @@ class Op(object):
def
_parse_channeldata
(
self
,
channeldata_dict
):
data_id
,
error_channeldata
=
None
,
None
client_need_profile
,
profile_
list
=
False
,
[]
client_need_profile
,
profile_
set
=
False
,
set
()
parsed_data
=
{}
key
=
list
(
channeldata_dict
.
keys
())[
0
]
...
...
@@ -175,32 +175,32 @@ class Op(object):
break
parsed_data
[
name
]
=
data
.
parse
()
if
client_need_profile
:
profile_
list
.
extend
(
data
.
profile_data_list
)
profile_
set
|=
data
.
profile_data_set
return
(
data_id
,
error_channeldata
,
parsed_data
,
client_need_profile
,
profile_
lis
t
)
profile_
se
t
)
def
_push_to_output_channels
(
self
,
data
,
channels
,
name
=
None
,
client_need_profile
=
False
,
profile_
lis
t
=
None
):
profile_
se
t
=
None
):
if
name
is
None
:
name
=
self
.
name
self
.
_add_profile_into_channeldata
(
data
,
client_need_profile
,
profile_
lis
t
)
profile_
se
t
)
for
channel
in
channels
:
channel
.
push
(
data
,
name
)
def
_add_profile_into_channeldata
(
self
,
data
,
client_need_profile
,
profile_
lis
t
):
profile_
se
t
):
profile_str
=
self
.
_profiler
.
gen_profile_str
()
if
self
.
_server_use_profile
:
sys
.
stderr
.
write
(
profile_str
)
if
client_need_profile
and
profile_
lis
t
is
not
None
:
profile_
list
.
appen
d
(
profile_str
)
data
.
add_profile
(
profile_
lis
t
)
if
client_need_profile
and
profile_
se
t
is
not
None
:
profile_
set
.
ad
d
(
profile_str
)
data
.
add_profile
(
profile_
se
t
)
def
start_with_process
(
self
,
client_type
):
proces
=
[]
...
...
@@ -398,7 +398,7 @@ class Op(object):
_LOGGER
.
debug
(
log
(
"input_data: {}"
.
format
(
channeldata_dict
)))
(
data_id
,
error_channeldata
,
parsed_data
,
client_need_profile
,
profile_
lis
t
)
=
self
.
_parse_channeldata
(
channeldata_dict
)
profile_
se
t
)
=
self
.
_parse_channeldata
(
channeldata_dict
)
# error data in predecessor Op
if
error_channeldata
is
not
None
:
try
:
...
...
@@ -421,7 +421,7 @@ class Op(object):
error_channeldata
,
output_channels
,
client_need_profile
=
client_need_profile
,
profile_
list
=
profile_lis
t
)
profile_
set
=
profile_se
t
)
except
ChannelStopError
:
_LOGGER
.
debug
(
log
(
"stop."
))
break
...
...
@@ -438,7 +438,7 @@ class Op(object):
error_channeldata
,
output_channels
,
client_need_profile
=
client_need_profile
,
profile_
list
=
profile_lis
t
)
profile_
set
=
profile_se
t
)
except
ChannelStopError
:
_LOGGER
.
debug
(
log
(
"stop."
))
break
...
...
@@ -455,7 +455,7 @@ class Op(object):
error_channeldata
,
output_channels
,
client_need_profile
=
client_need_profile
,
profile_
list
=
profile_lis
t
)
profile_
set
=
profile_se
t
)
except
ChannelStopError
:
_LOGGER
.
debug
(
log
(
"stop."
))
break
...
...
@@ -468,7 +468,7 @@ class Op(object):
output_data
,
output_channels
,
client_need_profile
=
client_need_profile
,
profile_
list
=
profile_lis
t
)
profile_
set
=
profile_se
t
)
except
ChannelStopError
:
_LOGGER
.
debug
(
log
(
"stop."
))
break
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录