Fix streaming mode

#13
by sanchit-gandhi HF staff - opened

Using the following code snippet:

from datasets import load_dataset

dataset = load_dataset("./multilingual_librispeech", "polish")

The version on main returns the following error:

RuntimeError: Sharding is ambiguous for this dataset: we found several data sources lists of different lengths, and we d
on't know over which list we should parallelize:
        - key audio_archives has length 46
        - key local_extracted_archive has length 46
        - key limited_ids_paths has length 1
To fix this, check the 'gen_kwargs' and make sure to use lists only for data sources, and use tuples otherwise. In the e
nd there should only be one single list, or several lists with the same length.

Whereas the version in this PR pre-processes successfully:

Generating train split: 25043 examples [00:09, 2750.48 examples/s]
Generating train.9h split: 2173 examples [00:08, 268.07 examples/s]
Generating train.1h split: 238 examples [00:08, 29.51 examples/s] 
Generating validation split: 512 examples [00:00, 2913.40 examples/s]
Generating test split: 520 examples [00:00, 2474.90 examples/s]
sanchit-gandhi changed pull request title from [WIP] Fix streaming mode to Fix streaming mode
sanchit-gandhi changed pull request status to merged

Sign up or log in to comment