-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Kg batch clustering #4847
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
Kg batch clustering #4847
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
Major refactor of Knowledge Graph clustering to improve memory efficiency and crash resilience through batch processing and parallelization.
- Introduces batch processing in
backend/onyx/kg/clustering/clustering.py
to prevent loading all entities into memory at once - Added
parent_key
column inbackend/onyx/db/models.py
for explicit parent-child relationships tracking - Parallelized parent-child relationship generation in
backend/onyx/kg/clustering/clustering.py
for better performance - Changed relationship handling in
backend/onyx/db/relationships.py
to work directly with normalized tables instead of staging - Fixed edge case in parent-child relationship creation when parent exists in normalized but not staging tables
5 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
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.
Tested locally
* super genius kg_entity parent migration * feat: batched clustering * fix: nit
Description
How Has This Been Tested?
Locally, on GitHub, Jira, Linear, and Salesforce. Both incrementally and in one go
Checked vespa to ensure the right information is there
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.