-
Notifications
You must be signed in to change notification settings - Fork 3k
Graphrag config #2119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v3/main
Are you sure you want to change the base?
Graphrag config #2119
Conversation
bf9a1f9 to
baa3129
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the configuration loading system by removing the create_graphrag_config function and introducing a new load_config utility in the graphrag-common package. The changes centralize configuration parsing, improve error handling, and standardize how CLI overrides are applied across the codebase.
- Removed
create_graphrag_configfunction and replaced it with directGraphRagConfiginstantiation or the newgraphrag_common.config.load_configutility - Added
python-dotenvandpyyamldependencies tographrag-commonpackage - Updated CLI override format from dot-notation strings (e.g., "output.base_dir") to nested dictionaries
Reviewed Changes
Copilot reviewed 36 out of 37 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/graphrag-common/pyproject.toml | Added python-dotenv and pyyaml dependencies |
| packages/graphrag-common/graphrag_common/config/load_config.py | New configuration loader with improved error handling and flexible parsing |
| packages/graphrag-common/graphrag_common/config/init.py | Exports load_config and ConfigParsingError |
| packages/graphrag/graphrag/config/load_config.py | Refactored to use graphrag_common.config.load_config |
| packages/graphrag/graphrag/config/create_graphrag_config.py | Deleted - functionality replaced by direct GraphRagConfig instantiation |
| packages/graphrag/graphrag/cli/*.py | Updated to use nested dict overrides instead of dot-notation strings |
| tests/verbs/*.py | Replaced create_graphrag_config calls with direct GraphRagConfig instantiation |
| tests/unit/config/test_config.py | Updated config loading tests to match new API signature |
| tests/unit/load_config/* | New test suite for the load_config functionality |
| unified-search-app/app/*.py | Updated imports and config instantiation |
| docs/examples_notebooks/*.ipynb | Updated imports and minor formatting fixes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Move
load_configtographrag-commonpackage.