Skip to content
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

Dev 4 community detection is deterministic #16

Merged
merged 4 commits into from
May 9, 2023

Conversation

thibaultprouteau
Copy link
Member

@thibaultprouteau thibaultprouteau commented May 5, 2023

Description

  • Number of threads is set to 1 in graph-embeddings
  • Community detection with Louvain has no randomness with 1 thread and without "none randomized" parallelization strategy.

Fixes #4

  • By default number of threads is set to -1, all available threads
  • Warning log message is clashing parameters are given for community detection (1 thread and parallelization != "none randomized")
  • Added option for passing alternative parallelization strategies from networkit.PLM
  • Updated docstrings
  • Compiled documentation to reflect changes

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Run on cora without setting then_jobs parameter of SINr 10 times -> different number of communities
  • Run on cora without setting then_jobs parameter of SINr but setting networkit.setNumberOfThreads(1) -> same of communities

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@thibaultprouteau thibaultprouteau added bug Something isn't working documentation Improvements or additions to documentation labels May 5, 2023
@thibaultprouteau thibaultprouteau self-assigned this May 5, 2023
@thibaultprouteau thibaultprouteau linked an issue May 5, 2023 that may be closed by this pull request
Fix log string in in for number of threads in graph-embeddings.
@thibaultprouteau thibaultprouteau marked this pull request as ready for review May 5, 2023 16:22
@thibaultprouteau
Copy link
Member Author

thibaultprouteau commented May 5, 2023

@nicolasdugue

Can you please review the changes made to sinr/graph-embeddings.py and tell me if they can be merged to dev ?

Thanks ! 😌

@thibaultprouteau thibaultprouteau merged commit 920b006 into dev May 9, 2023
@thibaultprouteau thibaultprouteau deleted the dev-4-community-detection-is-deterministic branch May 9, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Community detection is deterministic
2 participants