部分API的rst文档的`代码示例`与API名称不符 · Issue #6659 · PaddlePaddle/docs · GitHub
Skip to content

部分API的rst文档的代码示例与API名称不符 #6659

Open

Description

@Zoeeeeey

文档链接&描述 Document Links & Description

您好,

部分API的rst文档的代码示例中,COPY-FROM后给出的内容与API名称不符,通常多出一个“子命名空间”。

这可能不是文档bug,因为我并不了解代码示例的真实含义。

我仅从字面上理解,认为代码示例的内容应与API名称一致,因此报告此类错误。

1.多出layers

paddle.audio.features.MFCC
  rst文档路径:docs/api/paddle/audio/features/MFCC_cn.rst

paddle.audio.features.LogMelSpectrogram
  rst文档路径:docs/api/paddle/audio/features/LogMelSpectrogram_cn.rst

2.多出communication

paddle.distributed.stream.all_gather
  rst文档路径:docs/api/paddle/distributed/stream/all_gather_cn.rst

paddle.distributed.stream.all_reduce
  rst文档路径:docs/api/paddle/distributed/stream/all_reduce_cn.rst

paddle.distributed.stream.alltoall
  rst文档路径:docs/api/paddle/distributed/stream/alltoall_cn.rst

paddle.distributed.stream.alltoall_single
  rst文档路径:docs/api/paddle/distributed/stream/alltoall_single_cn.rst

paddle.distributed.stream.broadcast
  rst文档路径:docs/api/paddle/distributed/stream/broadcast_cn.rst

paddle.distributed.stream.recv
  rst文档路径:docs/api/paddle/distributed/stream/recv_cn.rst

paddle.distributed.stream.reduce
  rst文档路径:docs/api/paddle/distributed/stream/reduce_cn.rst

paddle.distributed.stream.reduce_scatter
  rst文档路径:docs/api/paddle/distributed/stream/reduce_scatter_cn.rst

paddle.distributed.stream.scatter
  rst文档路径:docs/api/paddle/distributed/stream/scatter_cn.rst

paddle.distributed.stream.send
  rst文档路径:docs/api/paddle/distributed/stream/send_cn.rst

3.多出:code-static, code-example2等内容

如:paddle.optimizer.lr.LinearLR:code-static、paddle.profiler.make_scheduler:code-example2、paddle.regularizer.L1Decay:code-example2、paddle.regularizer.L2Decay:code-example2等

请提出你的建议/提个PR修复这个问题 Please give your suggestion/update a PR to fix it

认为:COPY-FROM后给出的API名称应该与目前的API名称保持一致

Activity

  1. Zoeeeeey commented on May 28, 2024

    @Zoeeeeey
    Author

    其他:

    1.方法名称缺少参数

    paddle.nn.LayerList.append, paddle.nn.LayerList.insert, paddle.nn.LayerList.extend
      rst文档路径:docs/api/paddle/nn/LayerList_cn.rst
    
    paddle.nn.LayerDict的方法pop, update
      rst文档路径:docs/api/paddle/nn/LayerDict_cn.rst
    

    2.部分参数缺少描述

    paddle.nn.SyncBatchNorm
      缺少对参数data_format、name的描述
      rst文档路径:docs/api/paddle/nn/SyncBatchNorm_cn.rst
    
  2. self-assigned this
    on Jun 18, 2024
  3. ooooo-create commented on Jun 18, 2024

    @ooooo-create
    Collaborator

    认为:COPY-FROM后给出的API名称应该与目前的API名称保持一致

    是的,两者应该保持一致。同时 COPY-FROM 以及 API名称 也都需要使用是 API 的公开路径(简单来说,在英文 api 文档中可以查到的 api 目前都属于公开 API,暴露的位置就是公开位置)。
    COPY-FROM 的用法可以参考这里 COPY-FROM。

    多出:code-static, code-example2等内容

    这些可以参考 COPY-FROM
    里面对于name 标识的设计

    .多出layers,多出communication

    • layers 确实是多出
    • communication 相关的 api,目前中文文档的 api 路径和英文公开api不一致,所以需要确认一下~ @sunzhongkai588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions