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

[Docathon] fix_cn_api_label #6220

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

ooooo-create
Copy link
Collaborator

@ooooo-create ooooo-create commented Oct 8, 2023

#6170 fix cn api_label(修复 包含 fluid 的 api_label 引用)(都是在处理 api 目录下的引用)

  1. 缺失中文文档

    • cn_api_fluid_layers_chunk_eval --> cn_api_paddle_metric_chunk_eval (通过在 paddle1.8-2.0的映射文档发现)
    • cn_api_fluid_layers_create_tensor --> cn_api_paddle_Tensor_create_tensor(查询英文文档发现)
    • cn_api_fluid_require_version --> cn_api_paddle_utils_require_version (查询英文文档发现,中文暂无此api,但是英文文档的示例代码使用的是base?)
  2. 暂未查找到对应 api

    • cn_api_fluid_layers_linear_chain_crf
    • cn_api_fluid_profiler_cuda_profiler
    • cn_api_fluid_profiler_reset_profiler
  3. 是否有必要新增api_label,像 .. _cn_api_paddle_profiler_Profiler_summary: 一样,子api_label
    1696747553815

    • cn_api_fluid_profiler_start_profiler --> cn_api_paddle_profiler_Profiler_start
    • cn_api_fluid_profiler_stop_profiler --> cn_api_paddle_profiler_Profiler_stop
  4. 添加一步文档中引用 <cn_api_[^p] ,<cn_[^a] 类似格式问题的修复(此pr未完成)
    @sunzhongkai588 @SigureMo

@paddle-bot
Copy link

paddle-bot bot commented Oct 8, 2023

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

@SigureMo
Copy link
Member

SigureMo commented Oct 9, 2023

这个 PR 貌似完成了 #6170 大多数,可以在表格里标记下,避免其他人重复认领~

@sunzhongkai588
Copy link
Collaborator

  1. 缺失中文文档
  1. paddle.metric.chunk_eval 应该是废弃了,看了下只有 crf_decoding 用到了这个 label,而且 crf_decoding 也废弃了,直接删文档吧。
  2. create_tensor 缺失了中文文档,需要在 paddle 目录下paddle.Tensor 的 rst 文件中补充。
  3. require_version英文文档目录是在 utils 下,但看代码好像是在 base 下。
    • 先在 utils 下增加中文的 require_version 文档吧,可以参考 英文文档 和 原中文文档
    • 顺便代码验证下,是否能使用 paddle.utils.require_version
  1. 暂未查找到对应 api
  1. cn_api_fluid_layers_linear_chain_crf 也是在 crf_decoding 里,直接删crf_decoding 文档吧
  2. cuda_profilerreset_profiler 均已废弃,在 paddle.utlis.overview 里删了吧
  1. 是否有必要新增api_label,像 .. _cn_api_paddle_profiler_Profiler_summary: 一样,子api_label

是可以的,但这里的问题是cn_api_fluid_profiler_start_profilercn_api_fluid_profiler_stop_profiler 已经废弃了,用的是新 Profiler。所以这两个也删了吧。

建议:
paddle.utlis.overview 也面里的 profiler 相关API 都可以删了,然后增加一行ref到新的 Profiler

docs/api/paddle/Tensor_cn.rst Outdated Show resolved Hide resolved
docs/api/paddle/Tensor_cn.rst Outdated Show resolved Hide resolved
Comment on lines 10 to 11
模型参数为模型中的 weight 和 bias 统称,在 fluid 中对应 fluid.Parameter 类,继承自 fluid.Variable,是一种可持久化的 variable。
该 API 的设置仅对模型参数生效,对通过 :ref:`cn_api_paddle_static_create_global_var` 、 :ref:`cn_api_fluid_layers_create_tensor` 等 API 创建的变量不会生效。
该 API 的设置仅对模型参数生效,对通过 :ref:`cn_api_paddle_static_create_global_var` 、 :ref:`cn_api_paddle_Tensor_create_tensor` 等 API 创建的变量不会生效。
Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 Oct 11, 2023

Choose a reason for hiding this comment

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

  • fluid 弃用了,这句话描述应该改一下(参照英文即可)
  • 记得新提 PR 补充一下 create_tensor 的中文文档(看API label应该得在 paddel.Tensor 下补充)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

get it✨

" :ref:`stop_profiler <cn_api_fluid_profiler_stop_profiler>` ", "停止使用性能分析器"
" :ref:`require_version <cn_api_fluid_require_version>` ", "用于检查已安装的飞桨版本是否介于[min_version, max_version]之间"
" :ref:`Profiler <cn_api_paddle_profiler_Profiler>` ", "通用性能分析器"
" :ref:`require_version <cn_api_paddle_utils_require_version>` ", "用于检查已安装的飞桨版本是否介于[min_version, max_version]之间"
Copy link
Collaborator

@sunzhongkai588 sunzhongkai588 Oct 11, 2023

Choose a reason for hiding this comment

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

记得新提 PR 补充require_version相关文档

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

get it✨

Copy link
Collaborator

@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

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