Error downloading dataset on AWS due to timeout

#17
by skeering - opened

Hi I am running this code on an AWS EC2 instance (with enough disk space - 3T)

from datasets import load_dataset

raw_datasets = load_dataset("cerebras/SlimPajama-627B")
raw_datasets.cache_files

raw_datasets.save_to_disk("my-arrow-datasets")

And getting a timeout error when downloading, does anyone know how to fix it? Thank you!

Downloading data:   0%|          | 0/59166 [00:00<?, ?files/s]
Downloading data:   0%|          | 1/59166 [18:48<18553:01:59, 1128.89s/files]
Downloading data:   0%|          | 3/59166 [18:49<4810:47:34, 292.73s/files]
Downloading data:   0%|          | 8/59166 [18:50<1324:03:07, 80.57s/files]
Downloading data:   4%|▎         | 2201/59166 [18:51<8:07:53,  1.95files/s]
Traceback (most recent call last):
  File "/home/ubuntu/scripts/llm_env/lib/python3.10/site-packages/urllib3/connectionpool.py", line 536, in _make_request
    response = conn.getresponse()
  File "/home/ubuntu/scripts/llm_env/lib/python3.10/site-packages/urllib3/connection.py", line 464, in getresponse
    httplib_response = super().getresponse()
  File "/opt/conda/lib/python3.10/http/client.py", line 1374, in getresponse
    response.begin()
  File "/opt/conda/lib/python3.10/http/client.py", line 318, in begin
    version, status, reason = self._read_status()
  File "/opt/conda/lib/python3.10/http/client.py", line 279, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/opt/conda/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/opt/conda/lib/python3.10/ssl.py", line 1274, in recv_into
    return self.read(nbytes, buffer)
  File "/opt/conda/lib/python3.10/ssl.py", line 1130, in read
    return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out

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

... (skipping some error message for the sake of conciseness)

    return super().send(request, *args, **kwargs)
  File "/home/ubuntu/scripts/llm_env/lib/python3.10/site-packages/requests/adapters.py", line 713, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: (ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: e>

Sign up or log in to comment