-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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] reformat example code with google style in 192-197 #55926
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
python/paddle/nn/functional/input.py
Outdated
# one_hot_label.shape = [4, 4] | ||
# one_hot_label = [[0., 1., 0., 0.], | ||
# [0., 1., 0., 0.], |
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.
需要改成 print 的形式
@@ -52,18 +52,18 @@ def all_gather(tensor_list, tensor, group=None, sync_op=True): | |||
.. code-block:: python | |||
|
|||
# required: 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.
去看看顺师傅怎么说的,需要加相应的 requires 指令
@@ -43,21 +43,21 @@ class P2POp: | |||
|
|||
# required: 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.
这里没改
>>> # paddle.tensor([1, 2]) # Rank-0 | ||
>>> # paddle.tensor([0, 1]) # Rank-1 |
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.
因为俺不知道应该输出啥!(理不直气也壮)
>>> # paddle.tensor([1, 2]) # Rank-0 | ||
>>> # paddle.tensor([0, 1]) # Rank-1 |
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.
因为俺不知道应该输出啥!(理不直气也壮)
... data = paddle.to_tensor([[1, 2, 3], [1, 2, 3]]) | ||
>>> dist.all_gather(tensor_list, data) | ||
>>> print(tensor_list) | ||
[[[4, 5, 6], [4, 5, 6]], [[1, 2, 3], [1, 2, 3]]] (2 GPUs) |
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.
恢复成注释形式吧
Sorry to inform you that f1ad0c5's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@Liyulingyue 张师傅再改一下,很快就能合了 |
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.
LGTMeow 🐾
…Paddle#55926) * Update input.py * Update input.py * Update gather.py * Update broadcast.py * Update batch_isend_irecv.py * Update all_to_all.py * Update all_reduce.py * Update all_gather.py * rollback * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码为新的格式
#55629