ReadTimeoutError when loading model
I am trying to load a model with langchain-huggingface using the followingfrom langchain_huggingface.embeddings.huggingface import HuggingFaceEmbeddings
model = HuggingFaceEmbeddings(model_name="sentence-transformers/paraphrase-multilingual-mpnet-base-v2")I get the following errorReadTimeout: (ReadTimeoutError("HTTPSConnectionPool(host='cdn-lfs.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: e8e18c49-82ab-4c61-8d6e-d478f16e6136)')I have also tried to load the model with other packages but I still get the same error.Does anyone have an idea why this happens and how I can resolve this ?Thanks
2024-10-17T09:40:12Z
hi@thib00I just tried for langchain and HF, and it works for both now. It might be a temporary glitch.
2024-10-17T11:26:15Z
vscode3354×1012 202 KBI have similar problems
2024-10-17T11:43:17Z
huggingface.co@dn6 on Hugging Face: "Sharing for anyone using Diffusers `from_single_file`...We’re on a journey to advance and democratize artificial intelligence through open source and open science.the reference reporunwayml/stable-diffusion-v1-5doesn’t exist anymore.In your case, the situation is a little different from his, and the very repo you’re trying to load has disappeared.Try thisstable-diffusion-v1-5/stable-diffusion-v1-5
2024-10-18T07:57:10Z
Thanks for the answer, but it still does not work on my side.
2024-10-18T08:00:49Z
Yours appears to be a network, mainly SSL issue.github.com/huggingface/transformersHTTPSConnectionPool(host='cdn-lfs.huggingface.co', port=443): Max retries exceededopened02:29AM - 08 Jul 21 UTCclosed03:01PM - 15 Aug 21 UTCmoh-yaniDear, 
I am new in Transformers, I just tried to run the syntax below:

from…transformers import BertForSequenceClassification, AdamW, BertConfig
model = BertForSequenceClassification.from_pretrained(
    "bert-base-cased", 
    num_labels = 2, 
    output_attentions = False, 
    output_hidden_states = False 
)

model.cuda()


However, I got an error message like:

`HTTPSConnectionPool(host='cdn-lfs.huggingface.co', port=443): Max retries exceeded with url: /bert-base-cased/d6992b8cd27d7a132eafce6a8210272329a371b1c762d453588795dd3
835593e (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff9e60c6dd0>: Failed to establish a new connection: [Errno -2] Name or service 
not known'))
Traceback (most recent call last):
  File "/root/anaconda3/envs/bert/lib/python3.7/site-packages/urllib3/connection.py", line 170, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/root/anaconda3/envs/bert/lib/python3.7/site-packages/urllib3/util/connection.py", line 73, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/root/anaconda3/envs/bert/lib/python3.7/socket.py", line 752, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
`

Any suggestions on how to fix it?

Kind regards,

MYSSL Certificate Issue🤗Transformers2 fixes 

quick one - on windows - pip install python-certifi-win32
preferred - install transformers package using the following command 
pip install transformers --use-feature=truststore