首页 > 其他分享 >MaxRetryError("HTTPSConnectionPool(host='huggingface.c

MaxRetryError("HTTPSConnectionPool(host='huggingface.c

时间:2024-05-10 11:37:12浏览次数:24  
标签:kb HTTPSConnectionPool py MaxRetryError mnt langchain host workspace line

问题记录:
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# python init_database.py --recreate-vs
recreating all vector stores
2024-05-10 10:06:10,715 - faiss_cache.py[line:92] - INFO: loading vector store in 'samples/vector_store/bge-large-zh-v1.5' from disk.
2024-05-10 10:06:11,000 - SentenceTransformer.py[line:66] - INFO: Load pretrained SentenceTransformer: BAAI/bge-large-zh-v1.5
2024-05-10 10:08:22,688 - embeddings_api.py[line:39] - ERROR: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/BAAI/bge-large-zh-v1.5 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f15f110e230>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: 89f6b84d-f385-45ab-b998-4290bfe078e7)')
AttributeError: 'NoneType' object has no attribute 'conjugate'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/mnt/workspace/langchain-ChatGLM/init_database.py", line 107, in <module>
    folder2db(kb_names=args.kb_name, mode="recreate_vs", embed_model=args.embed_model)
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/migrate.py", line 121, in folder2db
    kb.create_kb()
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/base.py", line 81, in create_kb
    self.do_create_kb()
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/faiss_kb_service.py", line 51, in do_create_kb
    self.load_vector_store()
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/faiss_kb_service.py", line 28, in load_vector_store
    return kb_faiss_pool.load_vector_store(kb_name=self.kb_name,
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_cache/faiss_cache.py", line 102, in load_vector_store
    vector_store = self.new_vector_store(embed_model=embed_model, embed_device=embed_device)
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_cache/faiss_cache.py", line 60, in new_vector_store
    vector_store = FAISS.from_documents([doc], embeddings, distance_strategy="METRIC_INNER_PRODUCT")
  File "/mnt/workspace/ChatGLM3/chat/lib/python3.10/site-packages/langchain_core/vectorstores.py", line 508, in from_documents
    return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)
  File "/mnt/workspace/ChatGLM3/chat/lib/python3.10/site-packages/langchain_community/vectorstores/faiss.py", line 959, in from_texts
    embeddings = embedding.embed_documents(texts)
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/base.py", line 439, in embed_documents
    return normalize(embeddings).tolist()
  File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/base.py", line 37, in normalize
    norm = np.linalg.norm(embeddings, axis=1)
  File "<__array_function__ internals>", line 200, in norm
  File "/mnt/workspace/ChatGLM3/chat/lib/python3.10/site-packages/numpy/linalg/linalg.py", line 2541, in norm
    s = (x.conj() * x).real
TypeError: loop of ufunc does not support argument 0 of type NoneType which has no callable conjugate method
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# 
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# 
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# 

地址不通:
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# 
(chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM# ping huggingface.co
解决办法:
向量模型库下载更新接口
https://www.modelscope.cn/models/Xorbits/bge-large-zh-v1.5/files

 

标签:kb,HTTPSConnectionPool,py,MaxRetryError,mnt,langchain,host,workspace,line
From: https://www.cnblogs.com/notonlydba/p/18183959

相关文章

  • Springboot项目镜像制作&传递环境变量、设置hostname、动态设置JVM参数、cmd&entrypoi
    实现制作一个springboot的镜像,并且可以传递环境变量实现动态JVM参数和端口。0.准备&cmd、entrypoint区别1.准备springboot项目一个简单的springboot项目,默认启动8001端口,里面只有一个接口。xxx%curllocalhost:8081indexdocker环境2.CMD、entrypoint区......
  • [转]docker访问宿主机 host.docker.internal 域名不生效的问题
    原文地址:docker网络问题host.docker.internal不生效?-SegmentFault思否host.docker.internal是一个开发功能,只在DockerDesktop有效。你用的是DockerDesktop吗?(Linux下一般都不是)https://docs.docker.com/deskt...ThehosthasachangingIPaddress(ornoneif......
  • docker网络配置:bridge模式、host模式、container模式、none模式
    在docker平台里有四种网络模式,今天继续分享一下它们的常用知识,进一步加深对docker技术的理解。1、docker网络模式分类dockerrun创建Docker容器时,可以用--net选项指定容器的网络模式,Docker主要有以下4种网络模式。bridge模式:--net=bridge如果不指定的话默认设置。host模式......
  • Unable to execute SonarScanner analysis: Fail to get bootstrap index from server
    1.背景编辑gitlab-ci流水线时,代码分析的job,maven使用sonar报错-mvncleanverifysonar:sonar-Dsonar.login=30c55d3b8d3d2569431fb39f3c488c90643a68442.错误信息[ERROR]Failedtoexecutegoalorg.sonarsource.scanner.maven:sonar-maven-plugin:3.11.0.3922:sonar(def......
  • 记录一个生产环境小错误。SSH连接时,出现提示远程密码重置的报错【Host key verificati
    报错解释:SSH报错"hostkeyverificationfailed"表示SSH客户端无法验证远程主机的身份,因此拒绝连接。这通常发生在首次连接到某个服务器时。解决方法: 如果确认远程主机是可信的,可以使用以下SSH命令跳过主机密钥的验证(不推荐,因为这会降低安全性):ssh-oUserKnownHosts......
  • Host '::1' is not allowed to connect to this MariaDB server
    登陆时报错,运行mysql-uroot-p 输入密码后报错ERROR1130(HY000):Host'::1'isnotallowedtoconnecttothisMariaDBserver 不允许连接原因:::1是IPv6下的本地主机地址,类似于IPv4下的127.0.0.1,表示本机回环地址。在大多数情况下,::1和localhost是等效的,都指......
  • web server apache tomcat11-24-Virtual Hosting and Tomcat
    前言整理这个官方翻译的系列,原因是网上大部分的tomcat版本比较旧,此版本为v11最新的版本。开源项目从零手写实现tomcatminicat别称【嗅虎】心有猛虎,轻嗅蔷薇。系列文章webserverapachetomcat11-01-官方文档入门介绍webserverapachetomcat11-02-setup启动web......
  • Bochs内存中的Guest和Host
      Bochs是通过配置文件(.bxrc文件)的方式来设置模拟计算机的硬件参数,其中MEMORY部分,分别需要设置Guest和Host的大小来决定虚拟计算机的内存大小,有什么区别呢?通过下面的Bochs构架图可以弄清楚:    要点说明:  1、Bochs在现实环境中属于应用程序,Host表示应用程序用来模拟内......
  • ShellExperienceHost.exe 是 Windows 10 操作系统中的一个系统进程,它负责管理和运行一
    ShellExperienceHost.exe是Windows10操作系统中的一个系统进程,它负责管理和运行一些用户界面相关的功能和效果。具体来说,ShellExperienceHost主要有以下作用:启动菜单和任务栏:ShellExperienceHost负责启动、管理和渲染开始菜单、任务栏以及相关的用户界面元素。窗......
  • 使用create-react-app,配置proxy报错(options.allowedHosts[0] should be a non-empty
    ​#使用create-react-app,配置proxy报错(options.allowedHosts[0]shouldbeanon-emptystring)今天在启动项目的时候遇到一个神奇的问题,这个问题具体报错信息是:Invalidoptionsobject.DevServerhasbeeninitializedusinganoptionsobjectthatdoesnotmatchtheAP......