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 331] reformat example code with google style in python/paddle/base/data_feeder.py #57138

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

yoyoIcy
Copy link
Contributor

@yoyoIcy yoyoIcy commented Sep 9, 2023

@paddle-bot
Copy link

paddle-bot bot commented Sep 9, 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 the contributor External developers label Sep 9, 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.

需要根据 codestyle 流水线提示修复 codestyle 问题

2023-09-09 12:21:25 ************************************************************************************
2023-09-09 12:21:25 Your PR code style check failed.
2023-09-09 12:21:25 Please install pre-commit locally and set up git hook scripts:
2023-09-09 12:21:25 
2023-09-09 12:21:25     pip install pre-commit==2.17.0
2023-09-09 12:21:25     pre-commit install
2023-09-09 12:21:25 
2023-09-09 12:21:25 Then, run pre-commit to check codestyle issues in your PR:
2023-09-09 12:21:25 
2023-09-09 12:21:25     pre-commit run --files python/paddle/base/data_feeder.py
2023-09-09 12:21:25 
2023-09-09 12:21:25 For more information, please refer to our codestyle check guide:
2023-09-09 12:21:25 https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/dev_guides/git_guides/codestyle_check_guide_cn.html
2023-09-09 12:21:25 ************************************************************************************

Copy link
Member

Choose a reason for hiding this comment

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

这些静态图示例代码需要添加 paddle.enable_static() 才能跑

image

def reader():
for _ in range(4):
yield np.random.random([4]).astype('float32'), np.random.random([3]).astype('float32'),
>>> place = base.CPUPlace()
Copy link
Member

Choose a reason for hiding this comment

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

尽可能不要用 base(原 fluid)

  • paddle.CPUPlace
  • paddle.static.Program

DataFeeder 不用改,没有对应的 API

Copy link
Contributor Author

Choose a reason for hiding this comment

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

请问下“DataFeeder 不用改,没有对应的 API”是说这个文件不用改代码示例了吗?

Copy link
Member

Choose a reason for hiding this comment

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

请问下“DataFeeder 不用改,没有对应的 API”是说这个文件不用改代码示例了吗?

是说 base.DataFeeder 不用改成非 base API 而已,这个文件当然要改

@luotao1 luotao1 added the HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 label Sep 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.

LGTMeow 🐾

@luotao1 luotao1 merged commit 6f131ff into PaddlePaddle:develop Sep 18, 2023
Frida-a pushed a commit to Frida-a/Paddle that referenced this pull request Oct 14, 2023
…n/paddle/base/data_feeder.py (PaddlePaddle#57138)

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

* enable static and clean fluid

---------

Co-authored-by: SigureMo <[email protected]>
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…n/paddle/base/data_feeder.py (PaddlePaddle#57138)

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

* enable static and clean fluid

---------

Co-authored-by: SigureMo <[email protected]>
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.

4 participants