Skip to content

[CodeStyle][Xdoctest][254-256] Fix example code(paddle.text.Imdb,paddle.text.Movielens,paddle.text.UCIHousing)#76926

Merged
ooooo-create merged 2 commits intoPaddlePaddle:developfrom
Z784555:xdoctest_fix254-256]
Dec 16, 2025
Merged

[CodeStyle][Xdoctest][254-256] Fix example code(paddle.text.Imdb,paddle.text.Movielens,paddle.text.UCIHousing)#76926
ooooo-create merged 2 commits intoPaddlePaddle:developfrom
Z784555:xdoctest_fix254-256]

Conversation

@Z784555
Copy link
Contributor

@Z784555 Z784555 commented Dec 16, 2025

PR Category

User Experience

PR Types

Improvements

Description

修复以下 API 的示例代码,适配 xdoctest 自动测试:

  1. paddle.text.Imdb:移除不支持的 +TIMEOUT 指令,修改预期输出为paddle.Size格式;
  2. paddle.text.Movielens:移除不支持的 +TIMEOUT 指令,修改预期输出为paddle.Size格式;
  3. paddle.text.UCIHousing:修改预期输出为paddle.Size格式。
  4. 上面示例代码对应 API Docstring 中的 .. code-block:: python 修改为 .. code-block:: pycon

修改后的示例代码已通过本地 xdoctest 验证,无运行报错,输出匹配。

Related links

@ooooo-create

@paddle-bot
Copy link

paddle-bot bot commented Dec 16, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot bot added the contributor External developers label Dec 16, 2025
@CLAassistant
Copy link

CLAassistant commented Dec 16, 2025

CLA assistant check
All committers have signed the CLA.

@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Dec 16, 2025
.. code-block:: python
.. code-block:: pycon

>>> # doctest: +TIMEOUT(75)
Copy link
Contributor

@ooooo-create ooooo-create Dec 16, 2025

Choose a reason for hiding this comment

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

为什么把这些 +TIMEOUT(75) 删了,你可以看看 static-check 流水线的日志,删掉之后会超时,issue 里面有 书写规范,下同,这是给 ci 看的

Copy link
Contributor Author

Choose a reason for hiding this comment

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

已恢复>>> # doctest: +TIMEOUT(75)
感谢提醒!之前因本地 xdoctest 解析警告误删了UserWarning: Unknown directive: '+TIMEOUT'

Copy link
Contributor

@ooooo-create ooooo-create left a comment

Choose a reason for hiding this comment

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

LGTM

@ooooo-create ooooo-create merged commit 61aeeec into PaddlePaddle:develop Dec 16, 2025
59 of 61 checks passed
@Z784555 Z784555 deleted the xdoctest_fix254-256] branch December 20, 2025 01:20
@mattheliu
Copy link
Collaborator

@Z784555 Thanks for your contribution! You will receive a beautiful PaddlePaddle gift. Please provide your mailing address and phone number by filling out the following questionnaire before January 23th,2026.

Looking forward to the future, we will walk further together in the world of open source!
Click Here :https://paddle.wjx.cn/vm/wEUMTJJ.aspx#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource 快乐开源活动issue与PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants