graphiti/graphiti_core/utils
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
..
maintenance Fix: Prevent oscillation in label propagation algorithm 2025-12-12 15:10:07 +08:00
ontology_utils move summary out of attribute extraction (#792) 2025-07-31 12:15:21 -04:00
__init__.py refactor: use utc_now() for consistent UTC datetime handling (#234) 2024-12-09 10:36:04 -08:00
bulk_utils.py Search client update (#1026) 2025-10-26 22:07:36 -04:00
datetime_utils.py Add support for Kuzu as the graph driver (#799) 2025-08-27 11:45:21 -04:00
text_utils.py update summary character limit (#1073) 2025-11-18 17:16:02 -05:00