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

fix: fix docstring issue #60962

Merged
merged 2 commits into from
Jan 22, 2024
Merged

fix: fix docstring issue #60962

merged 2 commits into from
Jan 22, 2024

Conversation

Hhankyangg
Copy link
Contributor

@Hhankyangg Hhankyangg commented Jan 18, 2024

PR types

Bug fixes

PR changes

Docs

Description

Copy link

paddle-bot bot commented Jan 18, 2024

你的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.

@SigureMo
Copy link
Member

### PR types

Docstring Bug fixes

### PR changes

- `paddle.transpose`
- `executor.py`

要严格遵守模板,否则 CheckPRTemplate 过不了的

@@ -1203,13 +1203,13 @@ class Executor:

>>> # Run the main program directly without compile.
>>> x = numpy.random.random(size=(10, 1)).astype('float32')
>>> loss_data, = exe.run(train_program, feed={"X": x}, fetch_list=[loss.name])
Copy link
Member

@SigureMo SigureMo Jan 18, 2024

Choose a reason for hiding this comment

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

loss_data, 多了个逗号

逗号不能删,这代表对单个结果进行 unpack

比如

(x, y, z) = exe.run(..., fetch_list=[x_var, y_var, z_var])
(x, y) = exe.run(..., fetch_list=[x_var, y_var])
(x, ) = exe.run(..., fetch_list=[x_var])
# 这里逗号怎么能删呢?删了的话拿到的不是 x,而是 (x, )

这里是静态图执行器最顶层的文档,很多同学都会参考这里的写法,所以这里一定不能改错

文档评测只是用户个人理解而已,很明显这位用户理解有误,类似问题应当仔细甄别

Copy link
Contributor Author

Choose a reason for hiding this comment

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

抱歉没有做好甄别,这就去 discard

@paddle-bot paddle-bot bot added the contributor External developers label Jan 18, 2024
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Jan 19, 2024
@Hhankyangg
Copy link
Contributor Author

### PR types

Docstring Bug fixes

### PR changes

- `paddle.transpose`
- `executor.py`

要严格遵守模板,否则 CheckPRTemplate 过不了的

已修改 pr 格式

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 0ab867e into PaddlePaddle:develop Jan 22, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants