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

在加载bookcorpus的过程中,builder_cls为None #85

Open
Charlly-D opened this issue Nov 16, 2024 · 4 comments
Open

在加载bookcorpus的过程中,builder_cls为None #85

Charlly-D opened this issue Nov 16, 2024 · 4 comments

Comments

@Charlly-D
Copy link


traindata = load_dataset(
'bookcorpus', split='train'
)
的这一步中,
builder_cls = get_dataset_builder_class(dataset_module, dataset_name=dataset_name)得到的builder_cls为None,
所以报错
builder_instance: DatasetBuilder = builder_cls(
TypeError: 'NoneType' object is not callable

@pennyLuo-hub
Copy link

You can download the data from this link (https://storage.googleapis.com/huggingface-nlp/datasets/bookcorpus/bookcorpus.tar.bz2) and extract it to a folder named "bookcorpus". I solved the issue by doing this, and I hope it helps you as well. @Charlly-D

@Charlly-D
Copy link
Author

Oh, thank you very much. But may I ask if you know why it dosen't work, and I find that when the datasets need to be loaded by .py document, it will report an error "UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte". @pennyLuo-hub

@pennyLuo-hub
Copy link

Maybe it's because the file is bookcorpus.tar.bz2 and hasn't been extracted.The data after extraction is as follows:books_large_p1.txt、books_large_p2.txt @Charlly-D .

@Charlly-D
Copy link
Author

Thank you very much. @pennyLuo-hub

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