Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
de58d900
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
185
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
de58d900
编写于
7月 30, 2020
作者:
B
barriery
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fix
上级
5e571c7b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
18 addition
and
9 deletion
+18
-9
python/pipeline/analyse.py
python/pipeline/analyse.py
+1
-1
python/pipeline/dag.py
python/pipeline/dag.py
+5
-4
python/pipeline/operator.py
python/pipeline/operator.py
+12
-4
未找到文件。
python/pipeline/analyse.py
浏览文件 @
de58d900
...
...
@@ -69,7 +69,7 @@ class Analyst(object):
with
open
(
self
.
_profile_file
)
as
f
:
for
line
in
f
.
readlines
():
line
=
line
.
strip
().
split
(
"
\t
"
)
if
line
[
0
]
==
"PROFILE"
:
if
line
[
0
]
==
"PROFILE"
and
len
(
line
)
>=
3
:
trace_list
=
self
.
_prase_line
(
line
[
1
],
line
[
2
],
counter
)
counter
+=
1
for
trace
in
trace_list
:
...
...
python/pipeline/dag.py
浏览文件 @
de58d900
...
...
@@ -112,7 +112,7 @@ class DAGExecutor(object):
if
not
isinstance
(
in_channel
,
(
ThreadChannel
,
ProcessChannel
)):
raise
TypeError
(
"in_channel must be Channel type, but get {}"
.
format
(
type
(
in_channel
)))
)
type
(
in_channel
)))
in_channel
.
add_producer
(
self
.
name
)
self
.
_in_channel
=
in_channel
...
...
@@ -120,7 +120,7 @@ class DAGExecutor(object):
if
not
isinstance
(
out_channel
,
(
ThreadChannel
,
ProcessChannel
)):
raise
TypeError
(
"iout_channel must be Channel type, but get {}"
.
format
(
type
(
out_channel
)))
)
type
(
out_channel
)))
out_channel
.
add_consumer
(
self
.
name
)
self
.
_out_channel
=
out_channel
...
...
@@ -148,7 +148,7 @@ class DAGExecutor(object):
(
_
,
channeldata
),
=
channeldata_dict
.
items
()
if
not
isinstance
(
channeldata
,
ChannelData
):
_LOGGER
.
error
(
'[DAG Executor] data must be ChannelData type, but get {}'
.
format
(
type
(
channeldata
)))
)
.
format
(
type
(
channeldata
)))
os
.
_exit
(
-
1
)
data_id
=
channeldata
.
id
...
...
@@ -380,7 +380,8 @@ class DAG(object):
)
if
self
.
_build_dag_each_worker
:
_LOGGER
.
info
(
"Because `build_dag_each_worker` mode is used, "
"Auto-batching is set to the default config."
)
"Auto-batching is set to the default config: "
"batch_size=1, auto_batching_timeout=None"
)
for
op
in
used_ops
:
op
.
use_default_auto_batching_config
()
...
...
python/pipeline/operator.py
浏览文件 @
de58d900
...
...
@@ -80,7 +80,15 @@ class Op(object):
self
.
_succ_close_op
=
False
def
use_default_auto_batching_config
(
self
):
if
self
.
_batch_size
!=
1
:
_LOGGER
.
warn
(
"Op({}) reset batch_size=1 (original: {})"
.
format
(
self
.
name
,
self
.
_batch_size
))
self
.
_batch_size
=
1
if
self
.
_auto_batching_timeout
!=
None
:
_LOGGER
.
warn
(
"Op({}) reset auto_batching_timeout=1 (original: {})"
.
format
(
self
.
name
,
self
.
_auto_batching_timeout
))
self
.
_auto_batching_timeout
=
None
def
use_profiler
(
self
,
use_profile
):
...
...
@@ -459,7 +467,7 @@ class Op(object):
# init op
try
:
self
.
_initialize
(
is_thread_op
,
client_type
)
self
.
_initialize
(
is_thread_op
,
client_type
,
concurrency_idx
)
except
Exception
as
e
:
_LOGGER
.
error
(
log
(
"init op failed: {}"
.
format
(
e
)))
os
.
_exit
(
-
1
)
...
...
@@ -564,7 +572,7 @@ class Op(object):
self
.
_finalize
(
is_thread_op
)
break
def
_initialize
(
self
,
is_thread_op
,
client_type
):
def
_initialize
(
self
,
is_thread_op
,
client_type
,
concurrency_idx
):
if
is_thread_op
:
with
self
.
_for_init_op_lock
:
if
not
self
.
_succ_init_op
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录