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

fix paddle.vision.datasets.* cn docs #4944

Merged
merged 10 commits into from
Jun 23, 2022

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented Jun 17, 2022

PR 内容

paddle.vision.datasets API 文档修复

英文文档同步更新 PR

PaddlePaddle/Paddle#43649

PADDLEPADDLE_PR=43649

相关 issue

总结存在的问题:

  • 代码示例缺少输出代码示例不统一,且无法表现各个 API 的特性及共性,全部重写
  • 部分使用 numpy 的示例同上
  • 优化返回值部分
  • optional 和 可选
  • 句首字母大写
  • 中文介绍没有和函数定义间隔一行
  • 中英文使用空格隔开的规范问题
  • 部分中文文档缺少参数表
  • 「MNIST、VOC2012」缺少参数 transform
  • 「VOC2012」的提升速度提示应作为 Note,然后中文同步增加该内容因为所有的数据集都不是从原始来源下载,因此这个说明显得有点多余,故删除
  • 「ImageFolder」中文文档描述部分缺少内容
  • 「ImageFolder」参数 extensions 缺少部分内容

可 close 的 issue:

closes PaddlePaddle/Paddle#43194
fixes #4792, fixes #4791, fixes #4790, fixes #4784, fixes #4782, fixes #4781

其它

另外因为发现之前修复的 paddle.Model API 时候 COPY-FROM 的规则搞错了,我原以为同一个类所有示例共享一个作用域需要用 label 分开,原来类下方法有自己的作用域,因此修复了下~

另外这个 PR 没做 COPY-FROM,所以中文文档是旧的示例代码,等 #4940 自动更新了 合入的 #4949 莫名其妙没更新 paddle.vision.datasets 下面的……还要我手动更新……

@paddle-bot-old
Copy link

paddle-bot-old bot commented Jun 17, 2022

✅ This PR's description meets the template requirements!
Please wait for other CI results.

@paddle-bot-old
Copy link

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

@SigureMo SigureMo force-pushed the fix-vision-datasets-cn-docs branch from 07d1683 to 142ad6d Compare June 18, 2022 19:01
@SigureMo SigureMo changed the title [WIP, Don't review] fix paddle.vision.datasets.* cn docs fix paddle.vision.datasets.* cn docs Jun 20, 2022
@SigureMo SigureMo marked this pull request as ready for review June 20, 2022 07:47
@Ligoml
Copy link
Collaborator

Ligoml commented Jun 21, 2022

COPY-FROM 已通过#4949 完成统一更新~


:ref:`cn_api_io_cn_Dataset`,DatasetFolder 实例。

属性
Copy link
Collaborator

Choose a reason for hiding this comment

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

属性部分请参考规范

Copy link
Member Author

@SigureMo SigureMo Jun 21, 2022

Choose a reason for hiding this comment

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

刚刚看了一下,但关于属性我有很大的疑问,这个属性如果中文文档这么写的话,英文文档要往哪里写呢?因为属性是不同于方法没有一个地方写 docstring 的呀(应该是这样子的吧)?

我看了下示例的 paddle.static.Program(paddle.Program 没有找到,貌似是 API 改名了?),我发现文档里暴露的属性都是 @property 装饰(或者说 getter)后的属性,这些属性确实是可以写 docstring,但相应的,非 @property 装饰的属性要如何写 docstring 呢?而且这个 API 文档里貌似有点混乱,属性里混入了大量的方法

image

唔,我又翻看了一些其他的类,貌似并没有找到相关可以参考的内容(非 @property 装饰的暴露的属性且中英文文档都完善的)~所以说属性的话是不管英文文档嘛?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@TCChenlong 呼唤龙哥,这个标准怎么说?

@SigureMo
Copy link
Member Author

SigureMo commented Jun 21, 2022

COPY-FROM 已通过#4949 完成统一更新~

结果 #4949 没有更新这一部分(paddle.vision.datasets.*) 😂,明明 #4940 里更新了的说,不过我手动更新完了~

@Ligoml
Copy link
Collaborator

Ligoml commented Jun 23, 2022

COPY-FROM 已通过#4949 完成统一更新~

结果 #4949 没有更新这一部分(paddle.vision.datasets.*) 😂,明明 #4940 里更新了的说,不过我手动更新完了~

好叭,#4940 因为出现了一些bad case所以close了重提的 #4949,改了就好哈哈

Copy link
Collaborator

@Ligoml Ligoml left a comment

Choose a reason for hiding this comment

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

LGTM

@Ligoml Ligoml merged commit 9fd69a9 into PaddlePaddle:develop Jun 23, 2022
@SigureMo SigureMo deleted the fix-vision-datasets-cn-docs branch June 23, 2022 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment