run Autogen and GraphRAG sample, report error: ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'
What happened?
Describe the bug I want to run the sample followed: https://github.com/microsoft/autogen/blob/main/python/samples/agentchat_graphrag/README.md, after completed the setup, when run the command: python app.py encounter the error:
(autogen) C:\Users\xxx\autogen\autogen\python\samples\agentchat_graphrag>python app.py
Traceback (most recent call last):
File "C:\Users\xxx\autogen\autogen\python\samples\agentchat_graphrag\app.py", line 10, in <module>
from autogen_ext.tools.graphrag import (
File "C:\Users\xxx\AppData\Local\miniconda3\envs\autogen\Lib\site-packages\autogen_ext\tools\graphrag\__init__.py", line 9, in <module>
from ._global_search import GlobalSearchTool, GlobalSearchToolArgs, GlobalSearchToolReturn
File "C:\Users\xxx\AppData\Local\miniconda3\envs\autogen\Lib\site-packages\autogen_ext\tools\graphrag\_global_search.py", line 8, in <module>
from graphrag.config.config_file_loader import load_config_from_file
ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'
To Reproduce
- conda create -n test python=3.12 -y
- conda activate test
- in dir autogen\python\samples\agentchat_graphrag, pip install -r requirements.txt
- run the setup steps
- python app.py
autogen\python\samples\agentchat_graphrag>conda list graphrag
packages in environment at C:\Users\xxx\AppData\Local\miniconda3\envs\test:
Name Version Build Channel
graphrag 2.1.0 pypi_0 pypi
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Which packages was the bug in?
Python AgentChat (autogen-agentchat>=0.4.0), Python Extensions (autogen-ext)
AutoGen library version.
Python 0.4.9
Other library version.
autogen-ext 0.4.9.3; graphrag 2.1.0
Model used
gpt-4o-2024-08-06
Model provider
Azure OpenAI
Other model provider
No response
Python version
3.12
.NET version
None
Operating system
Windows
pip install graphrag==1.2.0 can fix this issue.
I think "pip install -r requirements.txt" (autogen-ext[graphrag,openai,azure]>=0.4.0,<0.5) will install the latest version graphrag(2.1.0)
Thanks! I think we should update the GraphRAG extension to catch up with the latest version of GraphRAG.
Created issue here: https://github.com/microsoft/autogen/issues/6210
Help appreciated!
autogen-ext: 0.6.1 graphrag: 2.3.0
still not work.....
in https://github.com/microsoft/autogen/blob/main/python/packages/autogen-ext/src/autogen_ext/tools/graphrag/_local_search.py
config_file_loader file not exist in https://github.com/microsoft/graphrag/tree/main/graphrag/config
same there. high priority issue