EOF Error when trying to download Vietnamese

#5
by RaymondAISG - opened

Hi,

I'm encountering an eof error when trying to download the Vietnamese dataset. Does anyone know a workaround for this error? I encountered no issues with other languages.

Code:

from datasets import load_dataset
data = load_dataset("mc4", languages=["vi"])

Error message:

Generating train split: 78208568 examples [31:41, 778996.68 examples/s]multiprocess.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 1608, in _prepare_split_single
    for key, record in generator:
  File "/home/users/nus/ray.ng/.cache/huggingface/modules/datasets_modules/datasets/mc4/99acea4a740b4cc36e4a93a238c7de11b0ce341d65b7d37168b3b90fd64721d2/mc4.py", line 325, in _generate_examples
    for line in f:
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/gzip.py", line 314, in read1
    return self._buffer.read1(size)
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/gzip.py", line 507, in read
    raise EOFError("Compressed file ended before the "
EOFError: Compressed file ended before the end-of-stream marker was reached

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/multiprocess/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1349, in _write_generator_to_queue
    for i, result in enumerate(func(**kwargs)):
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 1644, in _prepare_split_single
    raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/users/nus/ray.ng/data_preprocessing/download_dataset.py", line 29, in <module>
    download()
  File "/home/users/nus/ray.ng/data_preprocessing/download_dataset.py", line 16, in download
    dataset = load_dataset("mc4", languages=[lang], cache_dir=cache_dir, num_proc=num_proc)
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/load.py", line 1782, in load_dataset
    builder_instance.download_and_prepare(
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 872, in download_and_prepare
    self._download_and_prepare(
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 1649, in _download_and_prepare
    super()._download_and_prepare(
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 967, in _download_and_prepare
    self._prepare_split(split_generator, **prepare_split_kwargs)
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/builder.py", line 1516, in _prepare_split
    for job_id, done, content in iflatmap_unordered(
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1373, in iflatmap_unordered
    [async_result.get() for async_result in async_results]
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 1373, in <listcomp>
    [async_result.get() for async_result in async_results]
  File "/home/users/nus/ray.ng/.conda/envs/translate/lib/python3.10/site-packages/multiprocess/pool.py", line 774, in get
    raise self._value
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset
RaymondAISG changed discussion status to closed

Sign up or log in to comment