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

[疑问][建议]话说为什么DataSet不支持List[Dict]的data?建议像huggingface 的Dataset那样支持一下? #427

Open
iamqiz opened this issue Nov 10, 2022 · 1 comment

Comments

@iamqiz
Copy link

iamqiz commented Nov 10, 2022

fastNLP不支持

from fastNLP import DataSet
ds=[{"name":"aa","age":21},{"name":"bb","age":22},{"name":"cc","age":19}]
data_set = DataSet(ds)

huggingface 的Dataset支持

from datasets import Dataset
ds=[{"name":"aa","age":21},{"name":"bb","age":22},{"name":"cc","age":19}]
dataset = Dataset.from_list(ds)

希望能支持

@x54-729
Copy link
Collaborator

x54-729 commented Nov 10, 2022

谢谢您的建议!我们会在之后添加对这种初始化方式的支持

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

No branches or pull requests

2 participants