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

[xdoctest][task 325] reformat example code with google style in paddle/fluid/pybind/place.cc #57610

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

sunzhongkai588
Copy link
Contributor

PR types

Others

PR changes

Others

Description

修改如下文件的示例代码,使其通过 xdoctest 检查:

  • paddle/fluid/pybind/place.cc

@megemini @SigureMo

Related links

@paddle-bot
Copy link

paddle-bot bot commented Sep 21, 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.

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.

PR-CI-Codestyle-Check 挂了哦,需要跑一下 pre-commit


ipu_place = paddle.IPUPlace()

>>> import paddle
Copy link
Member

Choose a reason for hiding this comment

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

required:ipu 要改成 doctest directive

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.

点错了,不小心 approve 了

Comment on lines +216 to +217
>>> import paddle
>>> fake_cpu_place = paddle.CustomPlace("FakeCPU", 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

需要加个 >>> # doctest: +REQUIRES(env:CUSTOM_DEVICE) ,不然直接报错跳出来了 ~

paddle/fluid/pybind/place.cc Show resolved Hide resolved
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.

LSTM ~ 🤗

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.

LGTMeow 🐾

@SigureMo SigureMo closed this Sep 27, 2023
@SigureMo SigureMo reopened this Sep 27, 2023
@luotao1 luotao1 merged commit f0e841d into PaddlePaddle:develop Sep 27, 2023
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
…e/fluid/pybind/place.cc (PaddlePaddle#57610)

* convert place.cc code

* fix place.cc doc string

* fix codestyle
jiahy0825 pushed a commit to jiahy0825/Paddle that referenced this pull request Oct 16, 2023
…e/fluid/pybind/place.cc (PaddlePaddle#57610)

* convert place.cc code

* fix place.cc doc string

* fix codestyle
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…e/fluid/pybind/place.cc (PaddlePaddle#57610)

* convert place.cc code

* fix place.cc doc string

* fix codestyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants