-
Notifications
You must be signed in to change notification settings - Fork 577
Label Propagation Lacks Max Iteration Cap, Risking Infinite Loop on Non-Converging Graphs #402
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
Comments
This would be the fix I am using locally:
|
I believe I'm running into the same issue. MCP gets stuck after building communities |
I tried your patch but I still timeout during "Building communities" and any commands after fail |
How did you apply it? Are you using the docker? If you are using the docker you need to adjust the dockerfile so that you build with the patch. I've been having no issues since making the changes. I copy graphiti core into the mcp_server folder, then i adjust the dockerfile to look like this
Then i rebuild the image without a cache. Then i have no issues |
In graphiti_core/utils/maintenance/community_operations.py, the label_propagation function performs iterative community detection based on neighbor voting.
However, there is no hard limit on the number of iterations, and the loop is governed only by a convergence check (no_change).
If convergence is not reached — for example, in graphs with oscillating or ambiguous neighbor relationships — the loop may never terminate.
In my setup, where I am using Graphiti MCP to be the memory bank of an AI Agent for coding, while doing the original input of my code structure, the I kept getting this issue, which caused me to debug and find the underlying. I fixed it locally and want to share.
IF someone can better explain why this occurs, eg the lack of convergences, I'd appreciate the education.
Current Behavior:
Expected Behavior:
Suggested Minimal Fix:
Impact:
Example log output from non converging labels
The text was updated successfully, but these errors were encountered: