Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
0b250a79
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0b250a79
编写于
11月 22, 2021
作者:
Z
zmx
提交者:
GitHub
11月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[heterps]remove api for heter pipeline ps (#37396)
* fix api. test=develop * fix api. test=develop
上级
a258badb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
0 addition
and
97 deletion
+0
-97
python/paddle/distributed/fleet/__init__.py
python/paddle/distributed/fleet/__init__.py
+0
-3
python/paddle/distributed/fleet/base/fleet_base.py
python/paddle/distributed/fleet/base/fleet_base.py
+0
-67
python/paddle/distributed/fleet/runtime/the_one_ps.py
python/paddle/distributed/fleet/runtime/the_one_ps.py
+0
-27
未找到文件。
python/paddle/distributed/fleet/__init__.py
浏览文件 @
0b250a79
...
...
@@ -68,14 +68,11 @@ server_num = fleet.server_num
server_index
=
fleet
.
server_index
server_endpoints
=
fleet
.
server_endpoints
is_server
=
fleet
.
is_server
is_heter_worker
=
fleet
.
is_heter_worker
util
=
UtilBase
()
barrier_worker
=
fleet
.
barrier_worker
init_worker
=
fleet
.
init_worker
init_heter_worker
=
fleet
.
init_heter_worker
init_server
=
fleet
.
init_server
run_server
=
fleet
.
run_server
run_heter_worker
=
fleet
.
run_heter_worker
stop_worker
=
fleet
.
stop_worker
distributed_optimizer
=
fleet
.
distributed_optimizer
save_inference_model
=
fleet
.
save_inference_model
...
...
python/paddle/distributed/fleet/base/fleet_base.py
浏览文件 @
0b250a79
...
...
@@ -565,24 +565,6 @@ class Fleet(object):
"""
return
self
.
_role_maker
.
_is_server
()
def
is_heter_worker
(
self
):
"""
Check whether the node is an instance of heter worker.
Returns:
bool: True if this is a node of heter worker,
False if not.
Examples:
.. code-block:: python
import paddle.distributed.fleet as fleet
fleet.init()
fleet.is_heter_worker()
"""
return
self
.
_role_maker
.
_is_heter_worker
()
def
barrier_worker
(
self
):
"""
barrier all workers
...
...
@@ -617,30 +599,6 @@ class Fleet(object):
"""
self
.
_runtime_handle
.
_init_worker
()
@
is_non_distributed_check
@
inited_runtime_handler
def
init_heter_worker
(
self
):
"""
init_heter_worker executor to initialize startup program,
Returns:
None
Examples:
.. code-block:: python
import paddle.distributed.fleet as fleet
fleet.init()
# build net
# fleet.distributed_optimizer(...)
fleet.init_heter_worker()
"""
self
.
_runtime_handle
.
_init_heter_worker
()
@
is_non_distributed_check
@
inited_runtime_handler
def
init_server
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -690,31 +648,6 @@ class Fleet(object):
"""
self
.
_runtime_handle
.
load_model
(
path
,
mode
)
@
is_non_distributed_check
@
inited_runtime_handler
def
run_heter_worker
(
self
,
dataset
):
"""
run_heter_worker will run heter trainer main program with executor.
Returns:
None
Examples:
.. code-block:: python
import paddle.distributed.fleet as fleet
fleet.init()
# build net
# fleet.distributed_optimizer(...)
dataset = ""
if fleet.is_heter_worker():
fleet.run_heter_worker(dataset)
"""
self
.
_runtime_handle
.
_run_heter_worker
(
dataset
)
@
is_non_distributed_check
@
inited_runtime_handler
def
run_server
(
self
):
...
...
python/paddle/distributed/fleet/runtime/the_one_ps.py
浏览文件 @
0b250a79
...
...
@@ -884,33 +884,6 @@ class TheOnePSRuntime(RuntimeBase):
host
,
port
=
ep
.
split
(
":"
)
self
.
_server
.
run_server
(
host
,
int
(
port
))
def
_init_heter_worker
(
self
):
executor
=
self
.
_get_executor
()
startup_program
=
fluid
.
default_startup_program
()
#real_startup_program = startup_program._heter_pipeline_opt[
# "startup_program"]
executor
.
run
(
startup_program
)
self
.
_init_worker
()
def
_run_heter_worker
(
self
,
dataset
=
None
,
scope
=
None
,
thread
=
0
,
debug
=
False
,
fetch_list
=
None
,
fetch_info
=
None
,
print_period
=
100
,
fetch_handler
=
None
):
executor
=
self
.
_get_executor
()
# dataset is not needed for heter worker
executor
.
train_from_dataset
(
program
=
fluid
.
default_main_program
(),
dataset
=
None
,
debug
=
debug
,
fetch_list
=
fetch_list
,
fetch_info
=
fetch_info
,
print_period
=
print_period
)
def
_stop_worker
(
self
):
self
.
_communicator
.
stop
()
if
self
.
role_maker
.
_is_heter_parameter_server_mode
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录