Skip to content
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 No.286-290 #56797

Merged
merged 6 commits into from
Sep 7, 2023

Conversation

yuchen202
Copy link
Contributor

PR types

Others

PR changes

Others

Description

修改如下文件的示例代码,使其通过 xdoctest 检查:

python/paddle/incubate/operators/graph_reindex.py
python/paddle/incubate/operators/graph_sample_neighbors.py
python/paddle/incubate/operators/graph_send_recv.py
python/paddle/incubate/operators/softmax_mask_fuse.py
python/paddle/incubate/operators/softmax_mask_fuse_upper_triangle.py

另外# doctest: +REQUIRES(env:GPU)这个不清楚怎么改,还请帮忙看一下

Related links

# doctest: +REQUIRES(env:GPU)这个不清楚怎么改,还请帮忙看一下
@paddle-bot
Copy link

paddle-bot bot commented Aug 30, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Aug 30, 2023
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 30, 2023
>>> rst = incubate.softmax_mask_fuse(x, mask)
>>> print(rst)
>>> Tensor(shape=[1, 1, 32, 32], dtype=float32, place=Place(gpu:0), stop_gradient=True,
>>> [[[[1. , 0. , 0. , ..., 0. ,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

输出前面不要加 >>>

修改了相关内容
Comment on lines 111 to 112
>>> reindex_src, reindex_dst, out_nodes = \
... paddle.incubate.graph_reindex(x, neighbors, count)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

不要用 \,会报 SyntaxError

>>> row = paddle.to_tensor(row, dtype="int64")
>>> colptr = paddle.to_tensor(colptr, dtype="int64")
>>> nodes = paddle.to_tensor(nodes, dtype="int64")
>>> out_neighbors, out_count = \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同样的问题,自行看 CI 报错,把所有问题都改了吧

yuchen202 and others added 3 commits September 6, 2023 10:22
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMeow 🐾

@luotao1 luotao1 merged commit 093f6ec into PaddlePaddle:develop Sep 7, 2023
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
…dlePaddle#56797)

* 8.30下午

# doctest: +REQUIRES(env:GPU)这个不清楚怎么改,还请帮忙看一下

* Update softmax_mask_fuse.py

修改了相关内容

* Update graph_reindex.py

* Update graph_sample_neighbors.py

全都测了一遍,全都是successful

* fix cases on cpu

* fix gpu cases

---------

Co-authored-by: SigureMo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants