-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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 332] reformat example code with google style in python/paddle/base/dataset.py #57143
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
python/paddle/base/dataset.py
Outdated
>>> filelist = ["a.txt", "b.txt"] | ||
>>> dataset.set_filelist(filelist) | ||
>>> dataset.load_into_memory() | ||
>>> print dataset.get_memory_data_size(fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法错误
python/paddle/base/dataset.py
Outdated
>>> filelist = ["a.txt", "b.txt"] | ||
>>> dataset.set_filelist(filelist) | ||
>>> dataset.load_into_memory() | ||
>>> print dataset.get_pv_data_size() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法错误
python/paddle/base/dataset.py
Outdated
>>> dataset.set_filelist(filelist) | ||
>>> dataset.load_into_memory() | ||
>>> dataset.global_shuffle(fleet) | ||
>>> print dataset.get_shuffle_data_size(fleet) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
语法错误
python/paddle/base/dataset.py
Outdated
dataset.set_pv_batch(128) | ||
>>> import paddle.base as base | ||
>>> dataset = base.DatasetFactory().create_dataset() | ||
>>> dataset.set_pv_batch(128) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set_pv_batch_size
dataset.set_use_var([data, label]) | ||
>>> import paddle.base as base | ||
>>> dataset = base.DatasetFactory().create_dataset() | ||
>>> dataset.set_use_var([data, label]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data,label 要定义一下 ~
>>> import paddle.base as base | ||
>>> dataset = base.DatasetFactory().create_dataset("QueueDataset") | ||
>>> dataset.local_shuffle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
加个 skip 吧~ 说明 NotImplementedError will be raised
>>> dataset = base.DatasetFactory().create_dataset() | ||
>>> data = paddle.static.data(name="data", shape=[None, 10, 10], dtype="int64") | ||
>>> label = paddle.static.data(name="label", shape=[None, 1], dtype="int64", lod_level=1) | ||
>>> dataset.set_use_var([data, label]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
根据 CI 报错,看样子需要 enable_static
一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMeow 🐾
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码,使其通过
xdoctest
检查:python/paddle/base/dataset.py
预览:
Related links
@sunzhongkai588 @SigureMo @megemini