HKUDS / LightRAG

"LightRAG: Simple and Fast Retrieval-Augmented Generation"
https://arxiv.org/abs/2410.05779
MIT License
9.22k stars 1.13k forks source link

V100 gpu执行ollama的示例失败 #276

Open litaolaile opened 1 week ago

litaolaile commented 1 week ago

image (lightGraph) (base) root@ctmt240508091427u9e-7684c88f7-bl5wc:/mnt/home/ollama/LightRAG-main/examples# python lightrag_ollama_demo.py INFO:lightrag:Logger initialized for working directory: ./dickens INFO:lightrag:Load KV full_docs with 0 data INFO:lightrag:Load KV text_chunks with 0 data INFO:lightrag:Load KV llm_response_cache with 0 data INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_entities.json'} 0 data INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_relationships.json'} 0 data INFO:nano-vectordb:Init {'embedding_dim': 768, 'metric': 'cosine', 'storage_file': './dickens/vdb_chunks.json'} 0 data INFO:lightrag:[New Docs] inserting 1 docs INFO:lightrag:Writing graph with 0 nodes, 0 edges Traceback (most recent call last): File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connectionpool.py", line 716, in urlopen httplib_response = self._make_request( File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1061, in _validate_conn conn.connect() File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f7932c7d190>: Failed to establish a new connection: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/connectionpool.py", line 802, in urlopen retries = retries.increment( File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/urllib3/util/retry.py", line 594, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/o200k_base.tiktoken (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7932c7d190>: Failed to establish a new connection: [Errno 110] Connection timed out'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/mnt/home/ollama/LightRAG-main/examples/lightrag_ollama_demo.py", line 31, in rag.insert(f.read()) File "/mnt/home/ollama/LightRAG-main/examples/lightrag/lightrag.py", line 196, in insert return loop.run_until_complete(self.ainsert(string_or_strings)) File "/root/anaconda3/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/mnt/home/ollama/LightRAG-main/examples/lightrag/lightrag.py", line 221, in ainsert for dp in chunking_by_token_size( File "/mnt/home/ollama/LightRAG-main/examples/lightrag/operate.py", line 33, in chunking_by_token_size tokens = encode_string_by_tiktoken(content, model_name=tiktoken_model) File "/mnt/home/ollama/LightRAG-main/examples/lightrag/utils.py", line 123, in encode_string_by_tiktoken ENCODER = tiktoken.encoding_for_model(model_name) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken/model.py", line 103, in encoding_for_model return get_encoding(encoding_name_for_model(model_name)) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken/registry.py", line 73, in get_encoding enc = Encoding(constructor()) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken_ext/openai_public.py", line 92, in o200k_base mergeable_ranks = load_tiktoken_bpe( File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken/load.py", line 147, in load_tiktoken_bpe contents = read_file_cached(tiktoken_bpe_file, expected_hash) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken/load.py", line 64, in read_file_cached contents = read_file(blobpath) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/tiktoken/load.py", line 25, in read_file resp = requests.get(blobpath) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, kwargs) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/mnt/home/ollama/lightGraph/lib/python3.9/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/o200k_base.tiktoken (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f7932c7d190>: Failed to establish a new connection: [Errno 110] Connection timed out'))

litaolaile commented 1 week ago

脚本文件内容:![image](https://github.com/user-attachments/assets/05cff714-403b-44db-8d87-63f8d2cd7ccc 本地ollma相关模型已经都有: image

litaolaile commented 1 week ago

由于是内网机器需要下载这个么? image

LarFii commented 2 days ago

我看报错内容是openai的通讯问题,怀疑是代码中仍然存在openai调用