Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
72968400
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
72968400
编写于
12月 11, 2018
作者:
H
heqiaozhi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
stop server out of run from file
上级
60d71a9e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
8 addition
and
9 deletion
+8
-9
python/paddle/fluid/async_executor.py
python/paddle/fluid/async_executor.py
+7
-7
python/paddle/fluid/distributed/ps_instance.py
python/paddle/fluid/distributed/ps_instance.py
+1
-2
未找到文件。
python/paddle/fluid/async_executor.py
浏览文件 @
72968400
...
@@ -86,7 +86,7 @@ class AsyncExecutor(object):
...
@@ -86,7 +86,7 @@ class AsyncExecutor(object):
scope
=
global_scope
()
scope
=
global_scope
()
self
.
executor
=
core
.
AsyncExecutor
(
scope
,
p
)
self
.
executor
=
core
.
AsyncExecutor
(
scope
,
p
)
self
.
instance
=
ps_instance
.
PaddlePSInstance
(
"init_param"
,
1
,
2
)
self
.
instance
=
ps_instance
.
PaddlePSInstance
(
1
,
2
)
def
run
(
self
,
program
,
data_feed
,
filelist
,
thread_num
,
fetch
,
debug
=
False
):
def
run
(
self
,
program
,
data_feed
,
filelist
,
thread_num
,
fetch
,
debug
=
False
):
"""
"""
...
@@ -151,10 +151,7 @@ class AsyncExecutor(object):
...
@@ -151,10 +151,7 @@ class AsyncExecutor(object):
self
.
executor
.
run_from_files
(
program_desc
,
self
.
executor
.
run_from_files
(
program_desc
,
data_feed
.
desc
(),
filelist
,
thread_num
,
data_feed
.
desc
(),
filelist
,
thread_num
,
fetch_var_names
,
debug
)
fetch_var_names
,
debug
)
self
.
instance
.
barrier_all
()
#worker do all things
if
self
.
instance
.
is_first_worker
():
self
.
executor
.
stop_server
()
self
.
instance
.
barrier_all
()
#sync
def
config_distributed_nodes
(
self
,
dist_opt
):
def
config_distributed_nodes
(
self
,
dist_opt
):
...
@@ -167,8 +164,11 @@ class AsyncExecutor(object):
...
@@ -167,8 +164,11 @@ class AsyncExecutor(object):
def
get_instance
(
self
):
def
get_instance
(
self
):
return
self
.
instance
return
self
.
instance
#def stop_server(self):
def
stop_server
(
self
):
# self.executor.stop_server()
self
.
instance
.
barrier_all
()
#worker do all things
if
self
.
instance
.
is_first_worker
():
self
.
executor
.
stop_server
()
self
.
instance
.
barrier_all
()
#sync
def
init_server
(
self
,
dist_desc
):
def
init_server
(
self
,
dist_desc
):
self
.
executor
.
init_server
(
dist_desc
,
self
.
instance
.
_rankid
)
self
.
executor
.
init_server
(
dist_desc
,
self
.
instance
.
_rankid
)
...
...
python/paddle/fluid/distributed/ps_instance.py
浏览文件 @
72968400
...
@@ -5,9 +5,8 @@ import sys
...
@@ -5,9 +5,8 @@ import sys
class
PaddlePSInstance
(
object
):
class
PaddlePSInstance
(
object
):
def
__init__
(
self
,
init_param
,
server_worker_mode
,
proc_per_node
):
def
__init__
(
self
,
server_worker_mode
,
proc_per_node
):
self
.
dh
=
dist_helper
.
MPIHelper
()
self
.
dh
=
dist_helper
.
MPIHelper
()
self
.
_config
=
init_param
self
.
_rankid
=
self
.
dh
.
get_rank
()
self
.
_rankid
=
self
.
dh
.
get_rank
()
self
.
_server_worker_mode
=
server_worker_mode
self
.
_server_worker_mode
=
server_worker_mode
self
.
_proc_per_node
=
proc_per_node
self
.
_proc_per_node
=
proc_per_node
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录