Datasets:

Modalities:
Image
Text
Formats:
webdataset
Languages:
English
ArXiv:
Libraries:
Datasets
WebDataset
License:

Issue when downloading the data via streaming

#3
by mrdbourke - opened

Hey there, I'm trying to download the dataset via streaming mode (to avoid using large data storage).

My code:

from datasets import load_dataset

dataset = load_dataset("apple/DataCompDR-1B", 
                       split="train", 
                       streaming=True)

next(iter(dataset))

And I'm getting the error:

AttributeError 'bytes' object has no attribute 'get'

Have you encountered this? Maybe it's something I'm doing wrong on my end with datatypes?

Example Google Colab notebook: https://colab.research.google.com/drive/1Q6RpKz45r58pkkLnat386gujF3-InMzi?usp=sharing

Hi ! npz support was recently fixed in datasets and we will do a new release soon.

In the meantime you can install datasets from main

pip install git+https://github.com/huggingface/datasets.git

We just released datasets 2.20 with a fix :)

pip install -U datasets
Apple org

Thanks @mrdbourke for your interest and reporting the issue and thanks @lhoestq for pushing the new version.
I verified the streaming snippet now works with the new version.

fartashf changed discussion status to closed
Apple org
edited Jun 15

One more note, @mrdbourke you might also want to experiment with the smaller 12M subset before scaling to 1B. DataCompDR-12M has the same format as DataCompDR-1B while DataCompDR-12M-bf16 is more compressed.

thank you all!

Sign up or log in to comment