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 No.102-104 #56124

Merged
merged 5 commits into from
Aug 16, 2023

Conversation

PommesPeter
Copy link
Contributor

@PommesPeter PommesPeter commented Aug 9, 2023

PR types

Others

PR changes

Others

Description

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

  • ./python/paddle/nn/functional/adadelta.py
  • ./python/paddle/nn/functional/adagrad.py
  • ./python/paddle/nn/layer/adam.py

预览:

en: http://preview-paddle-pr-56124.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/en/api/paddle/abs_en.html
zh: http://preview-paddle-pr-56124.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/abs_cn.html

关联 PR:

@sunzhongkai588 @SigureMo @megemini

@paddle-bot
Copy link

paddle-bot bot commented Aug 9, 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 contributor External developers status: proposed labels Aug 9, 2023
SigureMo
SigureMo previously approved these changes Aug 10, 2023
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 🐾

Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

挺好,没啥大问题 ~

@SigureMo @sunzhongkai588 Adagrad 的中文文档里面,缺少了公共方法的描述~

英文
image

中文
image

python/paddle/optimizer/adadelta.py Show resolved Hide resolved
python/paddle/optimizer/adagrad.py Show resolved Hide resolved
python/paddle/optimizer/adam.py Show resolved Hide resolved
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 10, 2023
@PommesPeter
Copy link
Contributor Author

已修改~

@SigureMo
Copy link
Member

codestyle 流水线需要看一下

@PommesPeter
Copy link
Contributor Author

codestyle 流水线需要看一下

已修复~

python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/lr.py Outdated Show resolved Hide resolved
python/paddle/optimizer/adadelta.py Outdated Show resolved Hide resolved
python/paddle/optimizer/adam.py Show resolved Hide resolved
Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

LGTM ~

@sunzhongkai588 Adagrad 的中文文档里面,缺少了公共方法的描述,其他 OK ~

@sunzhongkai588
Copy link
Contributor

@sunzhongkai588 Adagrad 的中文文档里面,缺少了公共方法的描述,其他 OK ~

@SigureMo 公共方法中文应该不需要补充吧?英文是自动抽取公共方法的docstring。(话说英文这方面..这应该算bug么?可以当成任务发出来修么 🥹)

@SigureMo
Copy link
Member

@SigureMo 公共方法中文应该不需要补充吧?英文是自动抽取公共方法的docstring。(话说英文这方面..这应该算bug么?可以当成任务发出来修么 🥹)

应该只是中英文生成工具不一致的问题吧,公共方法是自动继承的么?如果是自动继承的话我记得可以配置啥 no-inherit 啥的,好像是在 gen_doc.py 里

Copy link
Contributor

@sunzhongkai588 sunzhongkai588 left a comment

Choose a reason for hiding this comment

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

LGTM

@sunzhongkai588
Copy link
Contributor

@SigureMo 公共方法中文应该不需要补充吧?英文是自动抽取公共方法的docstring。(话说英文这方面..这应该算bug么?可以当成任务发出来修么 🥹)

应该只是中英文生成工具不一致的问题吧,公共方法是自动继承的么?如果是自动继承的话我记得可以配置啥 no-inherit 啥的,好像是在 gen_doc.py 里

是自动继承的好像。而且 gen_doc.py 大概率又要处于没人维护的状态..anyway吧先这样

@luotao1 luotao1 merged commit f272d69 into PaddlePaddle:develop Aug 16, 2023
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.

5 participants