"I may not be able to use a VPN when running the code on the server, and I encounter numerous errors every time it reaches the 'Transfer to deit-b' part. How can I resolve this?"
*Transfer to deit-b Traceback (most recent call last): File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) OSError: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connection.py", line 358, in connect self.sock = conn = self._new_conn() File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7eff29f1e2f0>: Failed to establish a new connection: [Errno 101] Network is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/miniconda3/envs/students/lib/python3.10/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: /timm/deit_base_patch16_224.fb_in1k/resolve/main/pytorch_model.bin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7eff29f1e2f0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1232, in hf_hub_download metadata = get_hf_file_metadata( File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn return fn(*args, **kwargs) File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1599, in get_hf_file_metadata r = _request_wrapper( File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 417, in _request_wrapper response = _request_wrapper( File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 452, in _request_wrapper return http_backoff( File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 258, in http_backoff response = session.request(method=method, url=url, **kwargs) File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/requests/sessions.py", line 587, in request resp = self.send(prep, **send_kwargs) File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/home/tianfengyuan/.local/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 63, in send return super().send(request, *args, **kwargs) File "/usr/local/miniconda3/envs/students/lib/python3.10/site-packages/requests/adapters.py", line 565, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /timm/deit_base_patch16_224.fb_in1k/resolve/main/pytorch_model.bin (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7eff29f1e2f0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: 95b9f5fa-b3a6-4355-a9a0-acd37a7082d9)')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/tianfengyuan/diff_attack/DiffAttack/main.py", line 203, in
I may not be able to use a VPN when running the code on the server, and I encounter numerous errors every time it reaches the 'Transfer to deit-b' part. How can I resolve this?
Hi @nil0330 ,
An alternative way is to download the pre-trained weight manually. I would recommend referring to the answer here.
Hope this helps.