Skip to content

Conversation

aztice
Copy link

@aztice aztice commented Sep 26, 2025

PR types

Others (Fixing Work)

PR changes

Docs

Description

  • 添加代码
  • 格式化代码并添加注释
  • 将英文注释翻译为英文

@sunzhongkai588 @luotao1

@Echo-Nie
Copy link
Contributor

问题和 #7481 一样

:::::::::
Tensor,从所有 expert 接收的数据。
Tensor,从所有 expert 接收的数据喵~

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
Author

Choose a reason for hiding this comment

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

不能留着嘛QAQ

Copy link
Contributor

@Echo-Nie Echo-Nie Sep 28, 2025

Choose a reason for hiding this comment

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

呐,不能留着喵~ 只需要修改有误的地方,方便用户看懂 QAQ

代码示例
:::::::::

COPY-FROM: paddle.distributed.utils.global_gather
Copy link
Contributor

Choose a reason for hiding this comment

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

这里目前渲染结果如下:
image

正常的COPY-FROM应该是和英文api源码对齐,上面的渲染是一个bug;需要检索一下该api的路径位置可能是发生了改变,所以可能需要变更路径~
可以参考 #7472 的检索方法,如果无法检索该API的话就可以考虑删除~

Copy link
Author

Choose a reason for hiding this comment

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

这边看了下,我最新的3.2版本的文档并没有这个api,旧版可以找到,估计是被移除了。

Copy link
Contributor

Choose a reason for hiding this comment

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

@aztice
Copy link
Author

aztice commented Sep 28, 2025

NOTICE

由于Eng官网并不能找到 moe_utils 以及 distributed.utils 因此直接将 moe_utils.py 中的代码块直接移到此处。

@aztice aztice requested a review from Echo-Nie September 28, 2025 02:27
@sunzhongkai588
Copy link
Collaborator

sunzhongkai588 commented Sep 30, 2025

NOTICE

由于Eng官网并不能找到 moe_utils 以及 distributed.utils 因此直接将 moe_utils.py 中的代码块直接移到此处。

@aztice
不要直接贴代码块到中文文档。我们的设计 copy-from 的初衷是使中、英文代码严格保持一致,直接移过来会破坏一致性,且会增加维护成本。

另外,如果官网文档找不到,建议直接看 paddle 仓库源码,所有英文文档均从源码的 docstring 里抽取出来的。参考

https://github.com/PaddlePaddle/Paddle/blob/208fb7687a43f8c4e9e493e545f07b2d560f4749/python/paddle/distributed/utils/moe_utils.py#L154

可以看到路径在 paddle.distrubuted.utils 下,应该是路径变了导致 copy-from 失败了

同时,也在 paddle 仓库里查一查该 API 相关的 PR,参考

https://github.com/PaddlePaddle/Paddle/pull/45909/files#diff-40d4db7d130ee7edd7296f975384b980ced7d669300ca5793d4f7f077e414732

这个 API 应该是不对外暴露给用户了,所以直接删除该文档即可,包括 overview 里如果有相关引用的话,也删除

@aztice
Copy link
Author

aztice commented Sep 30, 2025

NOTICE

由于Eng官网并不能找到 moe_utils 以及 distributed.utils 因此直接将 moe_utils.py 中的代码块直接移到此处。

@aztice 不要直接贴代码块到中文文档。我们的设计 copy-from 的初衷是使中、英文代码严格保持一致,直接移过来会破坏一致性,且会增加维护成本。

另外,如果官网文档找不到,建议直接看 paddle 仓库源码,所有英文文档均从源码的 docstring 里抽取出来的。参考

https://github.com/PaddlePaddle/Paddle/blob/208fb7687a43f8c4e9e493e545f07b2d560f4749/python/paddle/distributed/utils/moe_utils.py#L154

可以看到路径在 paddle.distrubuted.utils 下,应该是路径变了导致 copy-from 失败了

同时,也在 paddle 仓库里查一查该 API 相关的 PR,参考

https://github.com/PaddlePaddle/Paddle/pull/45909/files#diff-40d4db7d130ee7edd7296f975384b980ced7d669300ca5793d4f7f077e414732

这个 API 应该是不对外暴露给用户了,所以直接删除该文档即可,包括 overview 里如果有相关引用的话,也删除

你是指直接把 global_gather_cn.rst 删掉吗?因为操作比较敏感我不太确定(

@SigureMo
Copy link
Member

你是指直接把 global_gather_cn.rst 删掉吗?因为操作比较敏感我不太确定(

删,@sunzhongkai588 都说删了你怕啥,这个 API 确实不再是公开 API 了,docs/api/paddle/distributed/utils/global_scatter_cn.rst 也一样,一起删一下

Copy link
Contributor

@Echo-Nie Echo-Nie left a comment

Choose a reason for hiding this comment

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

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.

5 participants