TheAiSingularity / graphrag-local-ollama

Local models support for Microsoft's graphrag using ollama (llama3, mistral, gemma2 phi3)- LLM & Embedding extraction
MIT License
770 stars 115 forks source link

❌ create_base_entity_graph #34

Open Anorid opened 3 months ago

Anorid commented 3 months ago

python -m graphrag.index --init --root ./ragtest Initializing project at ./ragtest mv settings.yaml ./ragtestutodl-container-4be511b1ae-19736a14:~/autodl-tmp/graphrag-local-ollama# mv settings.yaml ./ragtest mv: cannot stat 'settings.yaml': No such file or directory python -m graphrag.index --root ./ragtest4:~/autodl-tmp/graphrag-local-ollama# python -m graphrag.index --root ./ragtest 🚀 Reading settings from ragtest/settings.yaml /root/miniconda3/lib/python3.10/site-packages/numpy/core/fromnumeric.py:59: FutureWarning: 'DataFrame.swapaxes' is deprecated and will be removed in a future version. Please use 'DataFrame.transpose' instead. return bound(*args, **kwds) 🚀 create_base_text_units id ... n_tokens 0 4a25dab6bbc7b764367e4d6baadd5a05 ... 300 1 72ee0a4be0a9109cffbb8d94f4253493 ... 300 2 a3ab3d8c1e33e7f8dd574c6ee791c82c ... 300 3 7c22470c6324e4c2499e531c31b74578 ... 101 4 7b4e128a12389cacb693c4d1cf7a7965 ... 300 5 efd8fda36bf6f6b3824489af108b519a ... 300 6 d27cdcb65db42c0c877078ad4bbc0349 ... 300 7 4bc1199e51b3761ff780c6962e102170 ... 249 8 242307f545da2144b2e3affbd99017d2 ... 49 9 f015bf374b40414fad140b78c21ec7bb ... 300 10 e65eea82cd46a8251e3ecf779e46cb6e ... 300 11 ee0c1bc3dce1d1879a0c015fa8a49e96 ... 300 12 dbe3016165bd0337671f6a43f95fe098 ... 219 13 7befbf2cdd18e8189b0f6e34637a77f3 ... 19 14 e2083317ca3a8f0690bde0981dd98ea3 ... 300 15 bc5189e278749afc6b33c41e86a27927 ... 300 16 6091f6e9e75fb0c08b45612806cf11e6 ... 300 17 6da66fe5d9df2b209d8e8cb274389bea ... 300 18 31170fdcb9137905634fbe1f6f7312cd ... 126

[19 rows x 5 columns] 🚀 create_base_extracted_entities entity_graph 0 <graphml xmlns="http://graphml.graphdrawing.or... 🚀 create_summarized_entities entity_graph 0 <graphml xmlns="http://graphml.graphdrawing.or... ❌ create_base_entity_graph None ⠏ GraphRAG Indexer ├── Loading Input (text) - 4 files loaded (0 filtered) ━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00 0:00:00 ├── create_base_text_units ├── create_base_extracted_entities ├── create_summarized_entities └── create_base_entity_graph ❌ Errors occurred during the pipeline run, see logs for more details. root@autodl-container-4be511b1ae-19736a14:~/autodl-tmp/graphrag-local-ollama# python -m graphrag.query --root ./ragtest --method global "What is machinelearning?"

INFO: Reading settings from ragtest/settings.yaml Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/autodl-tmp/graphrag-local-ollama/graphrag/query/main.py", line 84, in run_global_search( File "/root/autodl-tmp/graphrag-local-ollama/graphrag/query/cli.py", line 67, in run_global_search final_nodes: pd.DataFrame = pd.read_parquet( File "/root/miniconda3/lib/python3.10/site-packages/pandas/io/parquet.py", line 667, in read_parquet return impl.read( File "/root/miniconda3/lib/python3.10/site-packages/pandas/io/parquet.py", line 267, in read path_or_handle, handles, filesystem = _get_path_or_handle( File "/root/miniconda3/lib/python3.10/site-packages/pandas/io/parquet.py", line 140, in _get_path_or_handle handles = get_handle( File "/root/miniconda3/lib/python3.10/site-packages/pandas/io/common.py", line 882, in get_handle handle = open(handle, ioargs.mode) FileNotFoundError: [Errno 2] No such file or directory: '/root/autodl-tmp/graphrag-local-ollama/ragtest/output/20240730-161707/artifacts/create_final_nodes.parquet'

When I tried to run steps 11 and 12 of the demo, I got an error. After careful inspection, I found out what the txts in the prompts/...txt in the setting were and where they were.

jdsjxin commented 3 months ago

I have the same issues. Could anyone solve this?

wanchichang commented 3 months ago

I have the same issues.

rgoliveirati commented 2 months ago

I have the same issues. Could anyone solve this?

QinQG commented 2 months ago

这可能是一个极其简单的错误,查找log发现是“Error Invoking LLM”错误,我一开始以为是配置或者包的问题,所以排查了settings.yaml里面模型名称,调整了各种token的大小但依旧未得解决,之后我又将.env的文件的使其“GRAPHRAG_API_KEY=ollama”但还是没有解决,最后我看到settings.yaml里面的api_base,发觉由于ollama的端口经常占用我将它由默认的11434改成了其他,哦,恍然大悟,这里也需要跟着改。 解决方法:找到自己ollama运行的端口,将settings.yaml里面的api_base由默认端口改成自己调整的,确保ollama运行服务“ollama serve”。