【paddle.fleet】Update fleetrun & ps-heter#27472
Merged
seiriosPlus merged 27 commits intoPaddlePaddle:developfrom Oct 13, 2020
Merged
【paddle.fleet】Update fleetrun & ps-heter#27472seiriosPlus merged 27 commits intoPaddlePaddle:developfrom
seiriosPlus merged 27 commits intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
|
✅ This PR's description meets the template requirements! |
seiriosPlus
reviewed
Oct 10, 2020
| self._worker_endpoints = [] | ||
|
|
||
| trainers_num = os.getenv("PADDLE_TRAINERS_NUM", None) | ||
| assert trainers_num != None |
Collaborator
There was a problem hiding this comment.
assert 换成raise ValuseError
seiriosPlus
reviewed
Oct 10, 2020
| trainers_num = int(trainers_num) | ||
|
|
||
| training_role = os.getenv("TRAINING_ROLE", None) | ||
| assert training_role != None |
seiriosPlus
reviewed
Oct 12, 2020
| model_path = tempfile.mkdtemp() | ||
| fleet.save_persistables(executor=exe, dirname=model_path) | ||
| fleet.stop_worker() | ||
| shutil.rmtree(model_path) |
Collaborator
There was a problem hiding this comment.
只有0号节点才会创建 model_path。 这里删除直接删除,会不会报错?
Contributor
Author
There was a problem hiding this comment.
这里的确有问题,但是单测没有报错,我看一下
seiriosPlus
reviewed
Oct 12, 2020
| @@ -133,6 +133,8 @@ def __init__(self, main_program, startup_program, strategy, role_maker): | |||
|
|
|||
| self.origin_main_program = main_program | |||
| self.origin_startup_program = startup_program | |||
Collaborator
There was a problem hiding this comment.
origin main 和 origin ps main 的区别?
Contributor
Author
There was a problem hiding this comment.
origin_main是fluid.default_main_program()
origin_ps_main是经过了ps切图,但还没有经过异构切图的program,单独保存出来是为了后面异构的save模型
chen-zhiyu
pushed a commit
to chen-zhiyu/Paddle
that referenced
this pull request
Oct 15, 2020
* refine fleetrun.ps_launch * update fleet run for multi device support * ps_graph support ps-gpu * fix heter save * add heter save unittest * fix unittest & simple code * update fleetrun * fix fleetrun * fix launch barrier * fix role maker * add paddlecloud rolemaker unittest * rename heter_worker_device_guard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR types
New features,Bug fixes
PR changes
Others
Describe
优化fleetrun参数服务器任务启动代码,在
launch_utils.py中增加了class ParameterServerLauncher封装ps启动的实现对fleetrun启动命令进行了整理,现在使用fleetrun --help会分类说明各个参数
支持fleetrun提交ps-heter、ps-gpu任务
优化PaddleCloud RoleMaker 中 参数服务器环境变量检查的用户易用性
去掉了
_ps_env中的try&catch,os.env[]全部改为os.getenv()