-
Notifications
You must be signed in to change notification settings - Fork 332
GraphRAG on CPU Example #2002
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
GraphRAG on CPU Example #2002
Conversation
…ndexing Signed-off-by: Ed Lee <[email protected]>
…g improvements, and updated pydantic model validations from parse_obj to model_validate Signed-off-by: Ed Lee <[email protected]>
…ataprep, receiver, and final output. The UI payload had to be updated since the model was hardcoded and not based on LLM_MODEL_ID Signed-off-by: Ed Lee <[email protected]>
…LLM_MODEL_ID env variable. Before the UI request had model hardcoded. Signed-off-by: Ed Lee <[email protected]>
Signed-off-by: Ed Lee <[email protected]>
Signed-off-by: Ed Lee <[email protected]>
Signed-off-by: Ed Lee <[email protected]>
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
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 pull request introduces the "GraphRAG on CPU Example" feature and a bug fix for configuring the model in the UI, along with improved logging and deprecation handling in the backend. Key changes include:
- In GraphRAG/ui/svelte/src/lib/network/chat/Network.ts, replacing the hardcoded model with an environment variable (LLM_MODEL_ID) and adding a guard clause.
- In GraphRAG/graphrag.py, migrating from print statements to structured logging and updating Pydantic parsing methods.
- New and updated Docker Compose files and documentation for deploying GraphRAG on CPU (Xeon or laptop) configurations.
Reviewed Changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| GraphRAG/ui/svelte/src/lib/network/chat/Network.ts | Uses LLM_MODEL_ID from the environment instead of a hardcoded model value |
| GraphRAG/graphrag.py | Improves logging output, replaces deprecated Pydantic parse calls with model_validate, and aligns generator output |
| GraphRAG/example_data/README.md | Provides example datasets to test GraphRAG functionality |
| GraphRAG/docker_compose/intel/hpu/gaudi/compose.yaml | Configures the UI to use the model from an environment variable |
| GraphRAG/docker_compose/intel/cpu/xeon/compose.yaml | New file defining the CPU deployment configuration |
| GraphRAG/docker_compose/intel/cpu/xeon/README.md | Offers deployment instructions and context for the CPU example |
| GraphRAG/docker_compose/intel/cpu/xeon/GraphRAG_LLM_notes.md | Documents the roles and configuration of the three LLMs used in the application |
Files not reviewed (2)
- GraphRAG/docker_compose/intel/cpu/xeon/set_env.sh: Language not supported
- GraphRAG/example_data/programming_languages.txt: Language not supported
Comments suppressed due to low confidence (2)
GraphRAG/graphrag.py:159
- In the exception block of the align_generator method, consider logging the exception details (e.g., using logger.debug or logger.error) before yielding the raw JSON string. This will improve troubleshooting during debugging of LLM output processing.
yield f"data: {repr(json_str.encode('utf-8'))}\n\n"
GraphRAG/docker_compose/intel/cpu/xeon/compose.yaml:17
- [nitpick] For consistency and clarity, consider using uppercase naming for environment variables, e.g., change to NEO4J_APOC_EXPORT_FILE_ENABLED.
- NEO4J_apoc_export_file_enabled=true
…nent name. Signed-off-by: Ed Lee <[email protected]>
57e301b to
d50bf14
Compare
for more information, see https://pre-commit.ci
Signed-off-by: Ed Lee <[email protected]>
Signed-off-by: Ed Lee <[email protected]>
Signed-off-by: Ed Lee <[email protected]>
… into graphrag_workshop
Signed-off-by: Ed Lee <[email protected]>
|
PR will require these updated components to work: |
ashahba
left a comment
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.
The PR looks good but I have one question:
How are the datasets created? Manually or AI Generated?
I think I'll modify these a bit to quote directly from wiki and cite the source. |
Signed-off-by: Ed Lee <[email protected]>
… into graphrag_workshop
ashahba
left a comment
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.
LGTM!
Signed-off-by: Ed Lee <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rachel R <[email protected]> Co-authored-by: Abolfazl Shahbazi <[email protected]> Signed-off-by: alexsin368 <[email protected]>
Signed-off-by: Ed Lee <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rachel R <[email protected]> Co-authored-by: Abolfazl Shahbazi <[email protected]> Signed-off-by: cogniware-devops <[email protected]>
Description
New Feature
Bug Fix
Issues
N/A.
Type of change
List the type of change like below. Please delete options that are not relevant.
Dependencies
Depends on the following:
• Feature: OpenAI-compatible endpoint for text generation by edlee123 · Pull Request #1395 · opea-project/GenAIComps
• Update GraphRAG dataprep and retriever components by edlee123 · Pull Request #1746 · opea-project/GenAIComps
Tests
Would want to be able to pull the updated components in Dependencies to create a test like the Gaudi version..