Skip to content

Conversation

ooooo-create
Copy link
Contributor

@ooooo-create ooooo-create commented Aug 11, 2023

@paddle-bot
Copy link

paddle-bot bot commented Aug 11, 2023

你的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 contributor External developers status: proposed labels Aug 11, 2023
@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Aug 11, 2023
Copy link
Member

@SigureMo SigureMo left a comment

Choose a reason for hiding this comment

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

麻烦使用非 fluid API 替换下 fluid API,因为 fluid 即将移除,任何用到 fluid 的代码将会无法运行

import numpy as np
import paddle
paddle.enable_static()
>>> import paddle.fluid as fluid
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
>>> import paddle.fluid as fluid


exe = fluid.Executor(fluid.CPUPlace())
exe.run(fluid.default_startup_program())
>>> exe = fluid.Executor(fluid.CPUPlace())
Copy link
Member

Choose a reason for hiding this comment

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

fluid.Executor -> paddle.static.Executor

Copy link
Member

Choose a reason for hiding this comment

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

fluid.CPUPlace -> paddle.CPUPlace

exe = fluid.Executor(fluid.CPUPlace())
exe.run(fluid.default_startup_program())
>>> exe = fluid.Executor(fluid.CPUPlace())
>>> exe.run(fluid.default_startup_program())
Copy link
Member

Choose a reason for hiding this comment

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

fluid.default_startup_program -> paddle.static.default_startup_program

Copy link
Contributor Author

Choose a reason for hiding this comment

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

修改完用xdoctest检测,出现这个问题,要skip吗
屏幕截图 2023-08-17 153923

Copy link
Member

Choose a reason for hiding this comment

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

我这里试的是没问题啊,也许是旧的 convert-doctest 的问题?可以装一下最新的试试,或者直接提交上来看看 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.

是我自己代码改错了,不是convert-doctset问题,代码对了是可以通过的

Copy link
Contributor

@megemini megemini left a comment

Choose a reason for hiding this comment

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

LGTM ~ 赞!

@luotao1 luotao1 merged commit ee01d78 into PaddlePaddle:develop Aug 18, 2023
@ooooo-create ooooo-create deleted the xdoctest198-199 branch August 18, 2023 07:23
BeingGod pushed a commit to BeingGod/Paddle that referenced this pull request Sep 9, 2023
…tensor/*` (PaddlePaddle#56186)

* [Doctest]fix No.198-199, test=docs_preview

* [Doctest]fix No.199, test=docs_preview

* abandon fluid

* fix ()

* fix code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants