Skip to content

Conversation

jackson-119
Copy link
Contributor

PR types
others

PR changes
Docs

Description
Fix :attr:`` in the document

issue:#7435
@Echo-Nie @sunzhongkai588

@CLAassistant
Copy link

CLAassistant commented Sep 23, 2025

CLA assistant check
All committers have signed the CLA.

@Echo-Nie
Copy link
Contributor

修改一下标题,加一个简要描述如:
[Docathon][Fix Doc Format No.] fix xxxxxx

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Sep 24, 2025
@jackson-119 jackson-119 changed the title [Docathon][Fix Doc Format No.51-53] [Docathon][Fix Doc Format No.51-53]add space after attr'' Sep 24, 2025
- **norm_type** (float or int) - 所用 p-范数类型。可以是无穷范数的`inf`。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters`的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters` 的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已将attr前的中文冒号更改为英文冒号

Copy link
Contributor

Choose a reason for hiding this comment

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

已将attr前的中文冒号更改为英文冒号

image

这里渲染成斜体了,应该也需要在`两边加空格

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已加空格

Copy link
Contributor

@Echo-Nie Echo-Nie Sep 26, 2025

Choose a reason for hiding this comment

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

image

这里还是存在 `` 这样的符号改成下面这样吧:


xxxxx的总范数为 `nan`、`inf` 或 `-inf`,则抛出错误。

问题在于

对于 `` 包裹的内容,前反引号的前面需要空格,后反引号的后面不需要空格,rst语法对于空格有严格要求~ 还麻烦修改一下

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已调整

- **norm_type** (float or int) - 所用 p-范数类型。可以是无穷范数的`inf`。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters`的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters` 的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。

Copy link
Contributor

Choose a reason for hiding this comment

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

已将attr前的中文冒号更改为英文冒号

image

这里渲染成斜体了,应该也需要在`两边加空格

- **norm_type** (float or int) - 所用 p-范数类型。可以是无穷范数的`inf`。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters`的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自:attr:`parameters` 的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。

Copy link
Contributor

@Echo-Nie Echo-Nie Sep 26, 2025

Choose a reason for hiding this comment

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

image

这里还是存在 `` 这样的符号改成下面这样吧:


xxxxx的总范数为 `nan`、`inf` 或 `-inf`,则抛出错误。

问题在于

对于 `` 包裹的内容,前反引号的前面需要空格,后反引号的后面不需要空格,rst语法对于空格有严格要求~ 还麻烦修改一下

- **norm_type** (float or int) - 所用 p-范数类型。可以是无穷范数的`inf`。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自attr:`parameters`的梯度的总范数为`nan`、`inf`或`-inf`,则抛出错误。
- **error_if_nonfinite** (bool) - 如果为 True,且如果来自 :attr:`parameters` 的梯度的总范数为`nan`、 `inf` 或`-inf`,则抛出错误。

Copy link
Contributor

@Echo-Nie Echo-Nie Sep 27, 2025

Choose a reason for hiding this comment

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

image

现在渲染如上图,“或”的前面也需要空格,加一下就没问题了...麻烦同学有时间的时候再改一下
image

总范数为 `nan`、`inf` 或 `-inf`,则抛出错误。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

或的前面不是有空格吗,不好意思,我没太明白,是要再加一个空格吗还是加在后面?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

不好意思,已加

@Echo-Nie
Copy link
Contributor

LGTM, 等 #7462 revert之后可以合入

@luotao1 luotao1 merged commit 114a44f into PaddlePaddle:develop Sep 28, 2025
1 of 2 checks passed
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.

4 participants