# Wget timed out in CI/CD pipeline

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252%3E%5C
**Category:** Models\
**Created:** [October 27, 2024, 8:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252 "2024-10-27T20:22:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![a-ghasemi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@a-ghasemi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fa-ghasemi)%5C
**Post date:** [October 27, 2024, 8:22pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252%2F1 "2024-10-27T20:22:07Z")

</div>

Hi. As part of a CI/CD pipeline. I run the following command:

```auto
wget https://huggingface.co/Mozilla/Llama-3.2-1B-Instruct-llamafile/resolve/main/Llama-3.2-1B-Instruct.Q6_K.llamafile -O /llm.llamafile

```

, while the specified model link works from my local machine and two remote servers I could access, it remains indefinitely in “connecting to [huggingface.co](http://huggingface.co)” and fails with time-out on the one server where the code is running. Could it be because that server is somewhere blacklisted? It has not been heavily used before and it is anyways the first time I am downloading something of this size automatically from HF.

Any help is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 27, 2024, 11:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252%2F2 "2024-10-27T23:56:03Z")

</div>

Hmmm, not sure if this is a network routing/blacklist issue or a client-side configuration issue…  
But the fact that it persists until timeout without erroring out is unusual…

> <https://github.com/huggingface/huggingface_hub/issues/2319>
>
> \### Describe the bug
> 
> Hi I am consistently getting this error when I try to us…e a tokenizer, mode or pipeline from pretrained hf models:
> 
> \> OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like google-bert/bert-base-german-cased is not the path to a directory containing a file named config.json.
> Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
> 
> I checked my connection and cleared out the cache. Moreover when I update hugging face\_hub\[cli\] with pip install huggingface\_hub\[cli\], I get the following warning:
> \> WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('\<pip.\_vendor.urllib3.connection.HTTPSConnection object at 0x7fc032677010\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable')': /simple/huggingface-hub/
> 
> 
> The models I try to access were google-bert/bert-base-german-cased and dbmdz/bert-base-german-uncased. I am running the code on google cloud instances on n2d-standard-4 (4 vCPUs, 16 GB RAM) machine with transformers version 4.40.2. Could you please let me know what leads to this error and help me solve it?
> 
> \### Reproduction
> 
> from transformers import AutoTokenizer, AutoModelForMaskedLM
> 
> tokenizer = AutoTokenizer.from\_pretrained("google-bert/bert-base-german-cased")
> model = AutoModelForMaskedLM.from\_pretrained("google-bert/bert-base-german-cased")
> 
> \### Logs
> 
> \---------------------------------------------------------------------------
> OSError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:198, in HTTPConnection.\_new\_conn(self)
> 197 try:
> \--\> 198 sock = connection.create\_connection(
> 199 (self.\_dns\_host, self.port),
> 200 self.timeout,
> 201 source\_address=self.source\_address,
> 202 socket\_options=self.socket\_options,
> 203 )
> 204 except socket.gaierror as e:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:85, in create\_connection(address, timeout, source\_address, socket\_options)
> 84 try:
> \---\> 85 raise err
> 86 finally:
> 87 # Break explicitly a reference cycle
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/connection.py:73, in create\_connection(address, timeout, source\_address, socket\_options)
> 72 sock.bind(source\_address)
> \---\> 73 sock.connect(sa)
> 74 # Break explicitly a reference cycle
> 
> OSError: \[Errno 101\] Network is unreachable
> 
> The above exception was the direct cause of the following exception:
> 
> NewConnectionError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:793, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert\_same\_host, timeout, pool\_timeout, release\_conn, chunked, body\_pos, preload\_content, decode\_content, \*\*response\_kw)
> 792 # Make the request on the HTTPConnection object
> \--\> 793 response = self.\_make\_request(
> 794 conn,
> 795 method,
> 796 url,
> 797 timeout=timeout\_obj,
> 798 body=body,
> 799 headers=headers,
> 800 chunked=chunked,
> 801 retries=retries,
> 802 response\_conn=response\_conn,
> 803 preload\_content=preload\_content,
> 804 decode\_content=decode\_content,
> 805 \*\*response\_kw,
> 806 )
> 808 # Everything went great!
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:491, in HTTPConnectionPool.\_make\_request(self, conn, method, url, body, headers, retries, timeout, chunked, response\_conn, preload\_content, decode\_content, enforce\_content\_length)
> 490 new\_e = \_wrap\_proxy\_error(new\_e, conn.proxy.scheme)
> \--\> 491 raise new\_e
> 493 # conn.request() calls http.client.\*.request, not the method in
> 494 # urllib3.request. It also calls makefile (recv) on the socket.
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:467, in HTTPConnectionPool.\_make\_request(self, conn, method, url, body, headers, retries, timeout, chunked, response\_conn, preload\_content, decode\_content, enforce\_content\_length)
> 466 try:
> \--\> 467 self.\_validate\_conn(conn)
> 468 except (SocketTimeout, BaseSSLError) as e:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:1099, in HTTPSConnectionPool.\_validate\_conn(self, conn)
> 1098 if conn.is\_closed:
> \-\> 1099 conn.connect()
> 1101 # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:616, in HTTPSConnection.connect(self)
> 615 sock: socket.socket | ssl.SSLSocket
> \--\> 616 self.sock = sock = self.\_new\_conn()
> 617 server\_hostname: str = self.host
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connection.py:213, in HTTPConnection.\_new\_conn(self)
> 212 except OSError as e:
> \--\> 213 raise NewConnectionError(
> 214 self, f"Failed to establish a new connection: {e}"
> 215 ) from e
> 217 # Audit hooks are only available in Python 3.8+
> 
> NewConnectionError: \<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable
> 
> The above exception was the direct cause of the following exception:
> 
> MaxRetryError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/requests/adapters.py:486, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
> 485 try:
> \--\> 486 resp = conn.urlopen(
> 487 method=request.method,
> 488 url=url,
> 489 body=request.body,
> 490 headers=request.headers,
> 491 redirect=False,
> 492 assert\_same\_host=False,
> 493 preload\_content=False,
> 494 decode\_content=False,
> 495 retries=self.max\_retries,
> 496 timeout=timeout,
> 497 chunked=chunked,
> 498 )
> 500 except (ProtocolError, OSError) as err:
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/connectionpool.py:847, in HTTPConnectionPool.urlopen(self, method, url, body, headers, retries, redirect, assert\_same\_host, timeout, pool\_timeout, release\_conn, chunked, body\_pos, preload\_content, decode\_content, \*\*response\_kw)
> 845 new\_e = ProtocolError("Connection aborted.", new\_e)
> \--\> 847 retries = retries.increment(
> 848 method, url, error=new\_e, \_pool=self, \_stacktrace=sys.exc\_info()\[2\]
> 849 )
> 850 retries.sleep()
> 
> File /opt/conda/lib/python3.10/site-packages/urllib3/util/retry.py:515, in Retry.increment(self, method, url, response, error, \_pool, \_stacktrace)
> 514 reason = error or ResponseError(cause)
> \--\> 515 raise MaxRetryError(\_pool, url, reason) from reason # type: ignore\[arg-type\]
> 517 log.debug("Incremented Retry for (url='%s'): %r", url, new\_retry)
> 
> MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /google-bert/bert-base-german-cased/resolve/main/config.json (Caused by NewConnectionError('\<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable'))
> 
> During handling of the above exception, another exception occurred:
> 
> ConnectionError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1722, in \_get\_metadata\_or\_catch\_error(repo\_id, filename, repo\_type, revision, endpoint, proxies, etag\_timeout, headers, local\_files\_only, relative\_filename, storage\_folder)
> 1721 try:
> \-\> 1722 metadata = get\_hf\_file\_metadata(url=url, proxies=proxies, timeout=etag\_timeout, headers=headers)
> 1723 except EntryNotFoundError as http\_error:
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_validators.py:114, in validate\_hf\_hub\_args.\<locals\>.\_inner\_fn(\*args, \*\*kwargs)
> 112 kwargs = smoothly\_deprecate\_use\_auth\_token(fn\_name=fn.\_\_name\_\_, has\_token=has\_token, kwargs=kwargs)
> \--\> 114 return fn(\*args, \*\*kwargs)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1645, in get\_hf\_file\_metadata(url, token, proxies, timeout, library\_name, library\_version, user\_agent, headers)
> 1644 # Retrieve metadata
> \-\> 1645 r = \_request\_wrapper(
> 1646 method="HEAD",
> 1647 url=url,
> 1648 headers=headers,
> 1649 allow\_redirects=False,
> 1650 follow\_relative\_redirects=True,
> 1651 proxies=proxies,
> 1652 timeout=timeout,
> 1653 )
> 1654 hf\_raise\_for\_status(r)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:372, in \_request\_wrapper(method, url, follow\_relative\_redirects, \*\*params)
> 371 if follow\_relative\_redirects:
> \--\> 372 response = \_request\_wrapper(
> 373 method=method,
> 374 url=url,
> 375 follow\_relative\_redirects=False,
> 376 \*\*params,
> 377 )
> 379 # If redirection, we redirect only relative paths.
> 380 # This is useful in case of a renamed repository.
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:395, in \_request\_wrapper(method, url, follow\_relative\_redirects, \*\*params)
> 394 # Perform request and return if status\_code is not in the retry list.
> \--\> 395 response = get\_session().request(method=method, url=url, \*\*params)
> 396 hf\_raise\_for\_status(response)
> 
> File /opt/conda/lib/python3.10/site-packages/requests/sessions.py:589, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow\_redirects, proxies, hooks, stream, verify, cert, json)
> 588 send\_kwargs.update(settings)
> \--\> 589 resp = self.send(prep, \*\*send\_kwargs)
> 591 return resp
> 
> File /opt/conda/lib/python3.10/site-packages/requests/sessions.py:703, in Session.send(self, request, \*\*kwargs)
> 702 # Send the request
> \--\> 703 r = adapter.send(request, \*\*kwargs)
> 705 # Total elapsed time of the request (approximately)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_http.py:66, in UniqueRequestIdAdapter.send(self, request, \*args, \*\*kwargs)
> 65 try:
> \---\> 66 return super().send(request, \*args, \*\*kwargs)
> 67 except requests.RequestException as e:
> 
> File /opt/conda/lib/python3.10/site-packages/requests/adapters.py:519, in HTTPAdapter.send(self, request, stream, timeout, verify, cert, proxies)
> 517 raise SSLError(e, request=request)
> \--\> 519 raise ConnectionError(e, request=request)
> 521 except ClosedPoolError as e:
> 
> ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /google-bert/bert-base-german-cased/resolve/main/config.json (Caused by NewConnectionError('\<urllib3.connection.HTTPSConnection object at 0x7fa15b2b3880\>: Failed to establish a new connection: \[Errno 101\] Network is unreachable'))"), '(Request ID: 8df1d542-4895-405c-b79d-4d2ca4001529)')
> 
> The above exception was the direct cause of the following exception:
> 
> LocalEntryNotFoundError Traceback (most recent call last)
> File /opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:398, in cached\_file(path\_or\_repo\_id, filename, cache\_dir, force\_download, resume\_download, proxies, token, revision, local\_files\_only, subfolder, repo\_type, user\_agent, \_raise\_exceptions\_for\_gated\_repo, \_raise\_exceptions\_for\_missing\_entries, \_raise\_exceptions\_for\_connection\_errors, \_commit\_hash, \*\*deprecated\_kwargs)
> 396 try:
> 397 # Load from URL or cache if already cached
> \--\> 398 resolved\_file = hf\_hub\_download(
> 399 path\_or\_repo\_id,
> 400 filename,
> 401 subfolder=None if len(subfolder) == 0 else subfolder,
> 402 repo\_type=repo\_type,
> 403 revision=revision,
> 404 cache\_dir=cache\_dir,
> 405 user\_agent=user\_agent,
> 406 force\_download=force\_download,
> 407 proxies=proxies,
> 408 resume\_download=resume\_download,
> 409 token=token,
> 410 local\_files\_only=local\_files\_only,
> 411 )
> 412 except GatedRepoError as e:
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/utils/\_validators.py:114, in validate\_hf\_hub\_args.\<locals\>.\_inner\_fn(\*args, \*\*kwargs)
> 112 kwargs = smoothly\_deprecate\_use\_auth\_token(fn\_name=fn.\_\_name\_\_, has\_token=has\_token, kwargs=kwargs)
> \--\> 114 return fn(\*args, \*\*kwargs)
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1221, in hf\_hub\_download(repo\_id, filename, subfolder, repo\_type, revision, library\_name, library\_version, cache\_dir, local\_dir, user\_agent, force\_download, proxies, etag\_timeout, token, local\_files\_only, headers, endpoint, legacy\_cache\_layout, resume\_download, force\_filename, local\_dir\_use\_symlinks)
> 1220 else:
> \-\> 1221 return \_hf\_hub\_download\_to\_cache\_dir(
> 1222 # Destination
> 1223 cache\_dir=cache\_dir,
> 1224 # File info
> 1225 repo\_id=repo\_id,
> 1226 filename=filename,
> 1227 repo\_type=repo\_type,
> 1228 revision=revision,
> 1229 # HTTP info
> 1230 headers=headers,
> 1231 proxies=proxies,
> 1232 etag\_timeout=etag\_timeout,
> 1233 endpoint=endpoint,
> 1234 # Additional options
> 1235 local\_files\_only=local\_files\_only,
> 1236 force\_download=force\_download,
> 1237 )
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1325, in \_hf\_hub\_download\_to\_cache\_dir(cache\_dir, repo\_id, filename, repo\_type, revision, headers, proxies, etag\_timeout, endpoint, local\_files\_only, force\_download)
> 1324 # Otherwise, raise appropriate error
> \-\> 1325 \_raise\_on\_head\_call\_error(head\_call\_error, force\_download, local\_files\_only)
> 1327 # From now on, etag, commit\_hash, url and size are not None.
> 
> File /opt/conda/lib/python3.10/site-packages/huggingface\_hub/file\_download.py:1826, in \_raise\_on\_head\_call\_error(head\_call\_error, force\_download, local\_files\_only)
> 1824 else:
> 1825 # Otherwise: most likely a connection issue or Hub downtime =\> let's warn the user
> \-\> 1826 raise LocalEntryNotFoundError(
> 1827 "An error happened while trying to locate the file on the Hub and we cannot find the requested files"
> 1828 " in the local cache. Please check your connection and try again or make sure your Internet connection"
> 1829 " is on."
> 1830 ) from head\_call\_error
> 
> LocalEntryNotFoundError: An error happened while trying to locate the file on the Hub and we cannot find the requested files in the local cache. Please check your connection and try again or make sure your Internet connection is on.
> 
> The above exception was the direct cause of the following exception:
> 
> OSError Traceback (most recent call last)
> Cell In\[13\], line 3
> 1 from transformers import AutoTokenizer, AutoModelForMaskedLM
> \----\> 3 tokenizer = AutoTokenizer.from\_pretrained("google-bert/bert-base-german-cased")
> 4 model = AutoModelForMaskedLM.from\_pretrained("google-bert/bert-base-german-cased")
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/tokenization\_auto.py:819, in AutoTokenizer.from\_pretrained(cls, pretrained\_model\_name\_or\_path, \*inputs, \*\*kwargs)
> 817 if config\_tokenizer\_class is None:
> 818 if not isinstance(config, PretrainedConfig):
> \--\> 819 config = AutoConfig.from\_pretrained(
> 820 pretrained\_model\_name\_or\_path, trust\_remote\_code=trust\_remote\_code, \*\*kwargs
> 821 )
> 822 config\_tokenizer\_class = config.tokenizer\_class
> 823 if hasattr(config, "auto\_map") and "AutoTokenizer" in config.auto\_map:
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/configuration\_auto.py:928, in AutoConfig.from\_pretrained(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 925 trust\_remote\_code = kwargs.pop("trust\_remote\_code", None)
> 926 code\_revision = kwargs.pop("code\_revision", None)
> \--\> 928 config\_dict, unused\_kwargs = PretrainedConfig.get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> 929 has\_remote\_code = "auto\_map" in config\_dict and "AutoConfig" in config\_dict\["auto\_map"\]
> 930 has\_local\_code = "model\_type" in config\_dict and config\_dict\["model\_type"\] in CONFIG\_MAPPING
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/configuration\_utils.py:631, in PretrainedConfig.get\_config\_dict(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 629 original\_kwargs = copy.deepcopy(kwargs)
> 630 # Get config dict associated with the base config file
> \--\> 631 config\_dict, kwargs = cls.\_get\_config\_dict(pretrained\_model\_name\_or\_path, \*\*kwargs)
> 632 if "\_commit\_hash" in config\_dict:
> 633 original\_kwargs\["\_commit\_hash"\] = config\_dict\["\_commit\_hash"\]
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/configuration\_utils.py:686, in PretrainedConfig.\_get\_config\_dict(cls, pretrained\_model\_name\_or\_path, \*\*kwargs)
> 682 configuration\_file = kwargs.pop("\_configuration\_file", CONFIG\_NAME)
> 684 try:
> 685 # Load from local folder or from cache or download from model Hub and cache
> \--\> 686 resolved\_config\_file = cached\_file(
> 687 pretrained\_model\_name\_or\_path,
> 688 configuration\_file,
> 689 cache\_dir=cache\_dir,
> 690 force\_download=force\_download,
> 691 proxies=proxies,
> 692 resume\_download=resume\_download,
> 693 local\_files\_only=local\_files\_only,
> 694 token=token,
> 695 user\_agent=user\_agent,
> 696 revision=revision,
> 697 subfolder=subfolder,
> 698 \_commit\_hash=commit\_hash,
> 699 )
> 700 commit\_hash = extract\_commit\_hash(resolved\_config\_file, commit\_hash)
> 701 except EnvironmentError:
> 702 # Raise any environment error raise by \`cached\_file\`. It will have a helpful error message adapted to
> 703 # the original exception.
> 
> File /opt/conda/lib/python3.10/site-packages/transformers/utils/hub.py:441, in cached\_file(path\_or\_repo\_id, filename, cache\_dir, force\_download, resume\_download, proxies, token, revision, local\_files\_only, subfolder, repo\_type, user\_agent, \_raise\_exceptions\_for\_gated\_repo, \_raise\_exceptions\_for\_missing\_entries, \_raise\_exceptions\_for\_connection\_errors, \_commit\_hash, \*\*deprecated\_kwargs)
> 435 if (
> 436 resolved\_file is not None
> 437 or not \_raise\_exceptions\_for\_missing\_entries
> 438 or not \_raise\_exceptions\_for\_connection\_errors
> 439 ):
> 440 return resolved\_file
> \--\> 441 raise EnvironmentError(
> 442 f"We couldn't connect to '{HUGGINGFACE\_CO\_RESOLVE\_ENDPOINT}' to load this file, couldn't find it in the"
> 443 f" cached files and it looks like {path\_or\_repo\_id} is not the path to a directory containing a file named"
> 444 f" {full\_filename}.\\nCheckout your internet connection or see how to run the library in offline mode at"
> 445 " 'https://huggingface.co/docs/transformers/installation#offline-mode'."
> 446 ) from e
> 447 except EntryNotFoundError as e:
> 448 if not \_raise\_exceptions\_for\_missing\_entries:
> 
> OSError: We couldn't connect to 'https://huggingface.co/' to load this file, couldn't find it in the cached files and it looks like google-bert/bert-base-german-cased is not the path to a directory containing a file named config.json.
> Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
> 
> \### System info
> 
> \`\`\`shell
> \- huggingface\_hub version: 0.23.1
> \- Platform: Linux-5.10.0-29-cloud-amd64-x86\_64-with-glibc2.31
> \- Python version: 3.10.14
> \- Running in iPython ?: Yes
> \- iPython shell: ZMQInteractiveShell
> \- Running in notebook ?: Yes
> \- Running in Google Colab ?: No
> \- Token path ?: /home/jupyter/.cache/huggingface/token
> \- Has saved token ?: False
> \- Configured git credential helpers: 
> \- FastAI: N/A
> \- Tensorflow: N/A
> \- Torch: 2.3.0
> \- Jinja2: 3.1.4
> \- Graphviz: N/A
> \- keras: N/A
> \- Pydot: N/A
> \- Pillow: 10.3.0
> \- hf\_transfer: N/A
> \- gradio: N/A
> \- tensorboard: 2.6.2.2
> \- numpy: 1.26.4
> \- pydantic: 1.10.15
> \- aiohttp: 3.9.5
> \- ENDPOINT: https://huggingface.co
> \- HF\_HUB\_CACHE: /home/jupyter/.cache/huggingface/hub
> \- HF\_ASSETS\_CACHE: /home/jupyter/.cache/huggingface/assets
> \- HF\_TOKEN\_PATH: /home/jupyter/.cache/huggingface/token
> \- HF\_HUB\_OFFLINE: False
> \- HF\_HUB\_DISABLE\_TELEMETRY: False
> \- HF\_HUB\_DISABLE\_PROGRESS\_BARS: None
> \- HF\_HUB\_DISABLE\_SYMLINKS\_WARNING: False
> \- HF\_HUB\_DISABLE\_EXPERIMENTAL\_WARNING: False
> \- HF\_HUB\_DISABLE\_IMPLICIT\_TOKEN: False
> \- HF\_HUB\_ENABLE\_HF\_TRANSFER: False
> \- HF\_HUB\_ETAG\_TIMEOUT: 10
> \- HF\_HUB\_DOWNLOAD\_TIMEOUT: 10
> \`\`\`

> <https://github.com/huggingface/peft/issues/1478>
>
> Why do I still need to connect to huggingface.co when all my model files are loc…al? Is there a way to skip the connection? Even when I use a proxy, the connection still times out
> peft ==0.8.2
> \`\`\`
> The model is automatically converting to bf16 for faster inference. If you want to disable the automatic precision, please manually add bf16/fp16/fp32=True to "AutoModelForCausalLM.from\_pretrained".
> Try importing flash-attention for faster inference...
> Warning: import flash\_attn rotary fail, please install FlashAttention rotary to get higher efficiency https://github.com/Dao-AILab/flash-attention/tree/main/csrc/rotary
> Warning: import flash\_attn rms\_norm fail, please install FlashAttention layer\_norm to get higher efficiency https://github.com/Dao-AILab/flash-attention/tree/main/csrc/layer\_norm
> Warning: import flash\_attn fail, please install FlashAttention to get higher efficiency https://github.com/Dao-AILab/flash-attention
> Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 \[03:07\<00:00, 23.45s/it\]
> Traceback (most recent call last):
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connection.py", line 174, in \_new\_conn
> conn = connection.create\_connection(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\util\\connection.py", line 95, in create\_connection
> raise err
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\util\\connection.py", line 85, in create\_connection
> sock.connect(sa)
> socket.timeout: timed out
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connectionpool.py", line 715, in urlopen
> httplib\_response = self.\_make\_request(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connectionpool.py", line 404, in \_make\_request    
> self.\_validate\_conn(conn)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connectionpool.py", line 1058, in \_validate\_conn
> conn.connect()
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connection.py", line 363, in connect
> self.sock = conn = self.\_new\_conn()
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connection.py", line 179, in \_new\_conn
> raise ConnectTimeoutError(
> urllib3.exceptions.ConnectTimeoutError: (\<urllib3.connection.HTTPSConnection object at 0x000002BB7D9BC100\>, 'Connection to huggingface.co timed out. (connect timeout=10)')
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\requests\\adapters.py", line 440, in send
> resp = conn.urlopen(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\connectionpool.py", line 799, in urlopen
> retries = retries.increment(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\urllib3\\util\\retry.py", line 592, in increment
> raise MaxRetryError(\_pool, url, error or ResponseError(cause))
> urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /output\_qwen\_chat/resolve/main/tokenizer\_config.json (Caused by ConnectTimeoutError(\<urllib3.connection.HTTPSConnection object at 0x000002BB7D9BC100\>, 'Connection to huggingface.co timed out. (connect timeout=10)'))
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\runpy.py", line 194, in \_run\_module\_as\_main
> return \_run\_code(code, main\_globals, None,
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\runpy.py", line 87, in \_run\_code
> exec(code, run\_globals)
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\adapter/../..\\debugpy\\launcher/../..\\debugpy\\\_\_main\_\_.py", line 39, in \<module\>
> cli.main()
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\adapter/../..\\debugpy\\launcher/../..\\debugpy/..\\debugpy\\server\\cli.py", line 430, in main
> run()
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\adapter/../..\\debugpy\\launcher/../..\\debugpy/..\\debugpy\\server\\cli.py", line 284, in run\_file
> runpy.run\_path(target, run\_name="\_\_main\_\_")
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\\_vendored\\pydevd\\\_pydevd\_bundle\\pydevd\_runpy.py", line 321, in run\_path       
> return \_run\_module\_code(code, init\_globals, run\_name,
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\\_vendored\\pydevd\\\_pydevd\_bundle\\pydevd\_runpy.py", line 135, in \_run\_module\_code
> \_run\_code(code, mod\_globals, init\_globals,
> File "c:\\Users\\Administrator\\.vscode\\extensions\\ms-python.python-2022.16.1\\pythonFiles\\lib\\python\\debugpy\\\_vendored\\pydevd\\\_pydevd\_bundle\\pydevd\_runpy.py", line 124, in \_run\_code      
> exec(code, run\_globals)
> File "d:\\xin\\text.py", line 151, in \<module\>
> model = AutoPeftModelForCausalLM.from\_pretrained(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\peft\\auto.py", line 115, in from\_pretrained
> tokenizer\_exists = file\_exists(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\utils\\\_validators.py", line 118, in \_inner\_fn
> return fn(\*args, \*\*kwargs)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\hf\_api.py", line 2219, in file\_exists
> get\_hf\_file\_metadata(url, token=token)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\utils\\\_validators.py", line 118, in \_inner\_fn
> return fn(\*args, \*\*kwargs)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\file\_download.py", line 1624, in get\_hf\_file\_metadata
> r = \_request\_wrapper(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\file\_download.py", line 402, in \_request\_wrapper
> response = \_request\_wrapper(
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\file\_download.py", line 425, in \_request\_wrapper
> response = get\_session().request(method=method, url=url, \*\*params)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\requests\\sessions.py", line 529, in request
> resp = self.send(prep, \*\*send\_kwargs)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\requests\\sessions.py", line 645, in send
> r = adapter.send(request, \*\*kwargs)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\huggingface\_hub\\utils\\\_http.py", line 63, in send
> return super().send(request, \*args, \*\*kwargs)
> File "E:\\Program\\Anaconda\\envs\\pytorch-gpu\\lib\\site-packages\\requests\\adapters.py", line 507, in send
> raise ConnectTimeout(e, request=request)
> requests.exceptions.ConnectTimeout: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /output\_qwen\_chat/resolve/main/tokenizer\_config.json (Caused by ConnectTimeoutError(\<urllib3.connection.HTTPSConnection object at 0x000002BB7D9BC100\>, 'Connection to huggingface.co timed out. (connect timeout=10)'))"), '(Request ID: e3217542-52b2-43bc-bd8d-411412c5d92e)')
> \`\`\`

> **[10 ways to troubleshoot wget failed: Connection timed out - howtouselinux](https://www.howtouselinux.com/post/wget-failed-connection-timed-out)**
>
> The “wget failed: Connection timed out” error occurs when wget is unable to establish a connection to the server within the specified timeout period. This can happen due to various reasons, such as network issues, firewall settings, or problems on...

---

<div class="post-metadata">

**Author:** ![a-ghasemi](https://avatars.discourse-cdn.com/v4/letter/a/f14d63/32.png) [@a-ghasemi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fa-ghasemi)%5C
**Post date:** [October 28, 2024, 10:26am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252%2F3 "2024-10-28T10:26:35Z")

</div>

Thanks. Here is an update:

I saw that [huggingface.co](http://huggingface.co) is being resolved to some IPv6 address. I suspected this and added `--inet4-only` to wget to force IPv4. Then the error changed to certificate verification issue, so I had to add `--no-check-certificate`, which finally worked!

This seems be something with my local DNS resolver, which I checked in `/etc/resolve.conf` and is set to 8.8.8.8. The resolver is different in the servers where wget originally worked.

I will contact my provider to check with them. I thought this information may be helpful to someone else. Thanks.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [October 28, 2024, 11:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fwget-timed-out-in-ci-cd-pipeline%2F114252%2F4 "2024-10-28T11:30:14Z")

</div>

I remember 8.8.8.8 was Google’s DNS. It doesn’t sound like it doesn’t work, but well, that’s what we suspect.  
Anyway, we’re lucky to have found what seems to be the cause of the problem.
