ChatGLM-6B icon indicating copy to clipboard operation
ChatGLM-6B copied to clipboard

[BUG/Help] <title>最近经常出现10054, '远程主机强迫关闭了一个现有的连接'有没有大佬能告诉我该怎么做呢?万分感谢

Open 604731578 opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

Expected Behavior

No response

Steps To Reproduce

1.in this environment 2.run python cli_demo.py 3.error File "C:\Users\DELL\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

Environment

- OS:windows11
- Python:3.10
- Transformers:4.27.1
- PyTorch:2.1.0+cu121
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :True

Anything else?

No response

604731578 avatar May 27 '23 16:05 604731578

最近 huggingface 上不去,若曾经下载过 THUDM/chatglm-6b 的模型,可尝试替换加载 model 的代码:

tokenizer = AutoTokenizer.from_pretrained(r"<pathtomodel>", trust_remote_code=True)
model = AutoModel.from_pretrained(r"<pathtomodel>", trust_remote_code=True).half().cuda()
model.eval()

其中 <pathtomodel> 路径内必须包含 pytorch_model-00001-of-00008.bin ~ pytorch_model-00008-of-00008.bin 几个文件

LemonQu-GIT avatar Jun 01 '23 13:06 LemonQu-GIT

maybe your frequent requests to the server lead to the suspicion that the server sends crawlers, which is identified as an attack by the website, and a 10054 exception is finally thrown. So, you can add a random wait time between requests.(random.random()*10)

karryu avatar Jun 06 '23 05:06 karryu

我也出现了这个问题,不知道咋解决

pjj123456 avatar Jul 08 '23 07:07 pjj123456

这个问题已经解决要使用魔法科学上网

pjj123456 avatar Jul 09 '23 07:07 pjj123456

而且有时候就算是同一个机场也得换个新节点才行

AndyTesla avatar Aug 05 '23 12:08 AndyTesla

用autodl里面有一个学术加速功能可以解决这个问题

---原始邮件--- 发件人: @.> 发送时间: 2023年8月5日(周六) 晚上8:43 收件人: @.>; 抄送: @.@.>; 主题: Re: [THUDM/ChatGLM-6B] [BUG/Help] <title>最近经常出现10054, '远程主机强迫关闭了一个现有的连接'有没有大佬能告诉我该怎么做呢?万分感谢 (Issue #1131)

而且有时候就算是同一个机场也得换个新节点才行

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

pjj123456 avatar Aug 05 '23 13:08 pjj123456