Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting http(s) proxy helps downloading models from Hugging face/Tensorflow Hub/PyTorch Hub #75

Open
tiansiyuan opened this issue Jun 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@tiansiyuan
Copy link
Contributor

tiansiyuan commented Jun 30, 2023

Is your feature request related to a problem? Please describe.

You may meet problems like:

requests.exceptions.SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /junnyu/roformer_chinese_base/resolve/main/vocab.txt (Caused by SSLError(SSLCertVerificationError(1, "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Hostname mismatch, certificate is not valid for 'huggingface.co'. (_ssl.c:1007)")))

Describe the solution you'd like

Setting proxy as below get rid of this problem.

import os
os.environ['HTTP_PROXY'] = 'http://proxy.company.com:port number>'
os.environ['HTTPS_PROXY'] = 'http://proxy.company.com:port number'

This setting also helps downloading models from Tensorflow Hub and PyTorch Hub, although the problems met on these sites are different from the one on Hugging Face.

Please be noted that the exact setting including the domain name and port number are highly likely different for your environment, provided you need to have a proxy server at first.

Describe alternatives you've considered

No response

Additional context

No response

@tiansiyuan tiansiyuan added the enhancement New feature or request label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant