graphiti/graphiti_core/utils/maintenance
remonxiao febf8923f6 Fix: Prevent oscillation in label propagation algorithm
- Changed from synchronous to asynchronous updates with randomized node order
- Added maximum iteration limit (100) to prevent infinite loops
- Implemented oscillation detection with early stopping mechanism
- Improved tie-breaking with deterministic sorting
- Added detailed docstring and logging for convergence/oscillation events
- Fixed oscillation detection to properly break out of nested loops

The previous implementation used synchronous updates where all nodes
updated simultaneously, which could cause oscillation in certain graph
structures (e.g., bipartite graphs). This fix ensures the algorithm
always terminates and produces stable community assignments while
maintaining backward compatibility with existing tests.
2025-12-12 15:10:07 +08:00
..
__init__.py Gemini support (#324) 2025-04-06 09:27:04 -07:00
community_operations.py Fix: Prevent oscillation in label propagation algorithm 2025-12-12 15:10:07 +08:00
dedup_helpers.py Refactor batch deduplication logic to enhance node resolution and track duplicate pairs (#929) (#936) 2025-09-26 08:40:18 -07:00
edge_operations.py Fix datetime comparison errors by normalizing to UTC (#988) 2025-10-07 08:28:56 -07:00
graph_data_operations.py [Improvement] Add GraphID isolation support for FalkorDB multi-tenant architecture (#835) 2025-11-03 10:56:53 -05:00
node_operations.py Add OpenTelemetry distributed tracing support (#982) 2025-10-05 12:26:14 -07:00
temporal_operations.py Add OpenTelemetry distributed tracing support (#982) 2025-10-05 12:26:14 -07:00