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

[automatic repair] update Chinese api_label with new standard #6171

Merged
merged 3 commits into from
Sep 7, 2023

Conversation

ooooo-create
Copy link
Collaborator

#6170

  1. 对每个 .rst api 文档的api_label进行修正
  2. 对修正前后的 api_label 进行 ref:引用的替换
  3. 对于文件以 .rst 结尾,但是不是 _cn.rst 修正 , 重命名
  4. 修正了部分文件 api_label 写成 .. _cp..... 的问题
  5. 对于非 fluid 相关的 api_label 中 2 所不能替换的,进行手动处理

@paddle-bot
Copy link

paddle-bot bot commented Sep 7, 2023

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-6171.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@@ -1,4 +1,4 @@
.. _cn_api_metric_Accuracy:
Copy link
Member

Choose a reason for hiding this comment

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

之前忘记说了,为了消除大小写不敏感文件系统的相互覆盖问题才引入的 __upper 后缀,前情提要见 PaddlePaddle/Paddle#44671

因此这个 API 应该是 paddle.metric.Accuracy,label 应该是 cn_api_paddle_metric_Accuracy,即遇到有 __upper 后缀的直接删除即可

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

6个都已修改完成

@@ -41,8 +41,8 @@ BatchNorm2D
- **num_features** (int) - 指明输入 ``Tensor`` 的通道数量。
- **epsilon** (float,可选) - 为了数值稳定加在分母上的值。默认值:1e-05。
- **momentum** (float,可选) - 此值用于计算 ``moving_mean`` 和 ``moving_var``。默认值:0.9。更新公式如上所示。
- **weight_attr** (ParamAttr|bool,可选) - 指定权重参数属性的对象。如果为 False,则表示每个通道的伸缩固定为 1,不可改变。默认值为 None,表示使用默认的权重参数属性。具体用法请参见 :ref:`cn_api_ParamAttr` 。
- **bias_attr** (ParamAttr|bool,可选) - 指定偏置参数属性的对象。如果为 False,则表示每一个通道的偏移固定为 0,不可改变。默认值为 None,表示使用默认的偏置参数属性。具体用法请参见 :ref:`cn_api_ParamAttr` 。
- **weight_attr** (ParamAttr|bool,可选) - 指定权重参数属性的对象。如果为 False,则表示每个通道的伸缩固定为 1,不可改变。默认值为 None,表示使用默认的权重参数属性。具体用法请参见 :ref:`_cn_api_paddle_ParamAttraramAttr` 。
Copy link
Member

Choose a reason for hiding this comment

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

这里真的没写错嘛?下同

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

替换的时候,写错了。
done

@@ -41,8 +41,8 @@ BatchNorm2D
- **num_features** (int) - 指明输入 ``Tensor`` 的通道数量。
- **epsilon** (float,可选) - 为了数值稳定加在分母上的值。默认值:1e-05。
- **momentum** (float,可选) - 此值用于计算 ``moving_mean`` 和 ``moving_var``。默认值:0.9。更新公式如上所示。
- **weight_attr** (ParamAttr|bool,可选) - 指定权重参数属性的对象。如果为 False,则表示每个通道的伸缩固定为 1,不可改变。默认值为 None,表示使用默认的权重参数属性。具体用法请参见 :ref:`_cn_api_paddle_ParamAttraramAttr` 。
- **bias_attr** (ParamAttr|bool,可选) - 指定偏置参数属性的对象。如果为 False,则表示每一个通道的偏移固定为 0,不可改变。默认值为 None,表示使用默认的偏置参数属性。具体用法请参见 :ref:`_cn_api_paddle_ParamAttraramAttr` 。
- **weight_attr** (ParamAttr|bool,可选) - 指定权重参数属性的对象。如果为 False,则表示每个通道的伸缩固定为 1,不可改变。默认值为 None,表示使用默认的权重参数属性。具体用法请参见 :ref:`cn_api_paddle_ParamAttraramAttr` 。
Copy link
Member

Choose a reason for hiding this comment

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

喵喵喵?修改后的怎么还是个很奇怪的 label?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

喵~,现在修复了,把这个api都修正了

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 🐾

@SigureMo
Copy link
Member

SigureMo commented Sep 7, 2023

[中文api文档中的api_label规范]中目标一与目标二.1

标题改一下吧,不建议使用中文标题,因为是会作为 git commit message 的

另外不建议标题说是啥啥任务的第几个(这个在 tracking issue 里 track 即可),直接说明做了什么即可,比如这个 PR 是「自动修复」中文 API label

@ooooo-create
Copy link
Collaborator Author

[中文api文档中的api_label规范]中目标一与目标二.1

标题改一下吧,不建议使用中文标题,因为是会作为 git commit message 的

另外不建议标题说是啥啥任务的第几个(这个在 tracking issue 里 track 即可),直接说明做了什么即可,比如这个 PR 是「自动修复」中文 API label

好哒好哒,有个问题,文档预览里有 paddel. 这个是正常的吗
image

@SigureMo
Copy link
Member

SigureMo commented Sep 7, 2023

好哒好哒,有个问题,文档预览里有 paddel. 这个是正常的吗

这个与你改动无关,CI 最近「修复」后出现的新问题,但现在没人力修复,不知道啥时候才能修了

#6162 (comment)

@ooooo-create ooooo-create changed the title [中文api文档中的api_label规范]中目标一与目标二.1 Automatic Repair Chinese API label with new standard Sep 7, 2023
@ooooo-create ooooo-create changed the title Automatic Repair Chinese API label with new standard Automatic Repair Chinese api_label with new standard Sep 7, 2023
@ooooo-create ooooo-create changed the title Automatic Repair Chinese api_label with new standard [automatic repair] update Chinese api_label with new standard Sep 7, 2023
@luotao1 luotao1 merged commit 94eb604 into PaddlePaddle:develop Sep 7, 2023
3 checks passed
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 7, 2023
@ooooo-create ooooo-create deleted the ooooo/cn_api_label branch September 23, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants