Skip to content
Discussion options

You must be logged in to vote

Great catch @AhmedGenbai, and welcome!

You are right that it is non-determinism, but Leiden is not the culprit — it is properly seeded (random_seed=42, trials=1) and its input is canonically sorted before each run. The root cause is upstream.

Root cause: os.walk() in detect.py returns files in filesystem b-tree order, which shifts between runs depending on kernel cache state, recent directory writes, or mount. Several downstream passes are first-writer-wins (cross-file import resolution, label dedup, symbol resolution) so whichever file happened to be seen first would win name collisions — producing different node IDs, edge targets, and Leiden input edge attributes each run.

Why runs 3 an…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@AhmedGenbai
Comment options

@AhmedGenbai
Comment options

Answer selected by safishamsi
Comment options

You must be logged in to vote
1 reply
@AhmedGenbai
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants