-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[xdoctest][task 232-235] reformat example code with google style in python/paddle/distributed/*
#57591
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
from paddle.nn import Linear | ||
from paddle.distributed import fleet | ||
from paddle.distributed.sharding import group_sharded_parallel | ||
>>> # doctest: +REQUIRES(env:distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
distributed
大写
from paddle.nn import Linear | ||
from paddle.distributed import fleet | ||
from paddle.distributed.sharding import group_sharded_parallel, save_group_sharded_model | ||
>>> # doctest: +REQUIRES(env:distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
python/paddle/distributed/spawn.py
Outdated
# this case will use cards {4,5} if your machine hold 8 cards. | ||
if __name__ == '__main__': | ||
dist.spawn(train, args=(True,), nprocs=2, gpus='4,5') | ||
>>> # doctest: +REQUIRES(env:distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同上
trainers=2, | ||
sync_mode=False, | ||
current_endpoint="127.0.0.1:7000") | ||
>>> # doctest: +REQUIRES(env:distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大写
@@ -175,13 +175,14 @@ class DistributeTranspilerConfig: | |||
Examples: | |||
.. code-block:: python | |||
|
|||
from paddle.distributed.transpiler.ps_dispatcher import RoundRobin | |||
import paddle.distributed.transpiler as transpiler | |||
>>> from paddle.distributed.transpiler.ps_dispatcher import RoundRobin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> from paddle.distributed.transpiler.distribute_transpiler import RoundRobin
num_trainers=trainer_num, | ||
trainer_id=trainer_id | ||
) | ||
>>> # doctest: +REQUIRES(env:distributed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
大写
... loss_name=avg_loss.name, | ||
... num_trainers=trainer_num, | ||
... trainer_id=trainer_id | ||
>>> ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 ...
或者把右括号放到上面
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
用 ... 吧,符合 black 格式化的效果
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 CI 是不是重跑一下?aistudio 上 paddle.base.libpaddle.WorkerInfo
没问题 ~
我看 |
aistudio 是重装官网的 develop 版本
应该是可以?~ 那这个地方的示例写个 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jinyouzhi 修改一下 >>> # doctest: +REQUIRES(env:distributed)
大小写 ~
... pserver_program = t.get_pserver_program(current_endpoint) | ||
... pserver_startup_program = t.get_startup_program(current_endpoint, | ||
... pserver_program) | ||
>>> elif role == "TRAINER": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elif 是复合语句的一部分,用 ...
代替 >>>
吧 ~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LSTM ~
Sorry to inform you that 62691e1's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@jinyouzhi 辛苦merge下最新的develop |
Done |
…python/paddle/distributed/*` (PaddlePaddle#57591) * [Doctest]fix No.232-235, test=docs_preview * fix format * add requires for rpc * fix typo * fix some * fix upcase
…python/paddle/distributed/*` (PaddlePaddle#57591) * [Doctest]fix No.232-235, test=docs_preview * fix format * add requires for rpc * fix typo * fix some * fix upcase
…python/paddle/distributed/*` (PaddlePaddle#57591) * [Doctest]fix No.232-235, test=docs_preview * fix format * add requires for rpc * fix typo * fix some * fix upcase
PR types
Others
PR changes
Others
Description
Related links
@sunzhongkai588 @SigureMo @megemini