KEMBAR78
upgrade graphrag sample to v2.3+ by victordibia · Pull Request #6744 · microsoft/autogen · GitHub
Skip to content

Conversation

@victordibia
Copy link
Collaborator

@victordibia victordibia commented Jul 3, 2025

Why are these changes needed?

upgrade graphrag sample to v2.3+

Related issue number

Closes #6210
Closes #6201

Checks

@victordibia
Copy link
Collaborator Author

@ekzhu ,

Graphrag requires an update to opena > 1.68 where the assistants api is deprecated in favour of the responses API.
Today we have both openai assistant agent and openai agent(responses api).

Should we remove/deprecate the assistant agent given that openai does not really support that anymore?
I can open a separate PR.

@ekzhu
Copy link
Collaborator

ekzhu commented Jul 5, 2025

@ekzhu ,

Graphrag requires an update to opena > 1.68 where the assistants api is deprecated in favour of the responses API.

Today we have both openai assistant agent and openai agent(responses api).

Should we remove/deprecate the assistant agent given that openai does not really support that anymore?

I can open a separate PR.

Can we move the extra for open ai assistant to its own "openai-assistant" with the older version as the upper, and then update "graphrag" extra with its required open ai version?

@ekzhu
Copy link
Collaborator

ekzhu commented Jul 5, 2025

It will be a breaking change and require anyone using both OpenAI assistant and GraphRag extension to upgrade

@Sid-LLM
Copy link

Sid-LLM commented Jul 17, 2025

Is this issue resolved already, or is there still work going on? I can't use GraphRAG's latest version as a tool for the AutoGen agent. I am getting the error ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'. I can use its older version, like 1.2.0 or something, but that also has issues of its own, which is understandable as it is an older version. I really need to use the latest version of GraphRAG with the AutoGen agent. Is there any way I can do this right now?

@ekzhu
Copy link
Collaborator

ekzhu commented Jul 17, 2025

Is this issue resolved already, or is there still work going on? I can't use GraphRAG's latest version as a tool for the AutoGen agent. I am getting the error ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'. I can use its older version, like 1.2.0 or something, but that also has issues of its own, which is understandable as it is an older version. I really need to use the latest version of GraphRAG with the AutoGen agent. Is there any way I can do this right now?

We need to get this PR through for this to be possible.

@ekzhu
Copy link
Collaborator

ekzhu commented Jul 17, 2025

@victordibia now let's put an OpenAI version constraint in the graph rag extra

UPDATE: note needed. The graph rag extra already takes care of the constraint.

@codecov
Copy link

codecov bot commented Jul 27, 2025

Codecov Report

❌ Patch coverage is 49.01961% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.74%. Comparing base (5f1c69d) to head (1814ea1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...t/src/autogen_ext/tools/graphrag/_global_search.py 43.47% 13 Missing ⚠️
...xt/src/autogen_ext/tools/graphrag/_local_search.py 40.90% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6744      +/-   ##
==========================================
+ Coverage   79.96%   80.74%   +0.77%     
==========================================
  Files         235      234       -1     
  Lines       18184    17892     -292     
==========================================
- Hits        14541    14447      -94     
+ Misses       3643     3445     -198     
Flag Coverage Δ
unittests 80.74% <49.01%> (+0.82%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ekzhu ekzhu merged commit f00d1ee into main Jul 27, 2025
71 of 72 checks passed
@ekzhu ekzhu deleted the update_graph_rag branch July 27, 2025 09:04
@Sid-LLM
Copy link

Sid-LLM commented Jul 28, 2025

The primary issue has been resolved now. LocalSearchTool and GlobalSearchTool can now be imported easily. However, I think you need to modify the _local_search.py file a little bit. The issue now is that when initializing the GlobalSearchTool and LocalSearchTool using the .from_settings() function, we can initialize GlobalSearchTool but not LocalSearchTool. It is giving the error that a 'str' object has no attribute .resolve(). I have checked the code of both _local_search.py and _global_search.py and found that the .from_settings() function is not converting the str into a Path, unlike what it does in _global_search.py. Therefore, by just adding:

if isinstance(root_dir, str):
root_dir = Path(root_dir)
if isinstance(config_filepath, str):
config_filepath = Path(config_filepath)

the issue is fixed, and we can finally use both LocalSearch and GlobalSearch in the autogen agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update GraphRAG version run Autogen and GraphRAG sample, report error: ModuleNotFoundError: No module named 'graphrag.config.config_file_loader'

3 participants