sknetwork-team / scikit-network

Graph Algorithms
Other
607 stars 66 forks source link

Fix #450: support 64-bit indices in Louvain #456

Closed fjsj closed 3 years ago

fjsj commented 3 years ago

Modifications:

Impacted submodules:

This pull request:

Any doubts about some technicalities? Do not hesitate to look at the dedicated Wiki.

fjsj commented 3 years ago

I'm having issues with psutil builds in Travis.

nathandelara commented 3 years ago

Thanks for the PR!

We are currently trying to think of ways not to use this extra dependency. You are experimenting first hand the troubles that we usually encounter with new dependencies and continuous integration. So adding one extra dependency just for this very specific feature might not be worth it.

In my opinion, there are still many workarounds to explore. Hopefully, we will give you a feedback soon.

Best

fjsj commented 3 years ago

Sounds great @nathandelara. I was able to build locally psutil in a Mac and CentOS 7 just fine. I suspect Travis may be making things more difficult here. But I agree ideally a new dependency shouldn't be added here.

QLutz commented 3 years ago

Hello,

We gave this some more thought and found that the 32/64-bit index switch can be handled in a much simpler way: letting SciPy choose the most appropriate size and sticking to it. Using the fused type you introduced, it seems to work without much effort. I tried making a commit to add those changes but it seems your organisation's parameters won't allow me to push on your fork. If you can apply these changes yourself (they are minimal), they consist in:

fjsj commented 3 years ago

Sounds great, thanks for the input! I'll do these updates ASAP.

fjsj commented 3 years ago

OK, just force-pushed to have a single commit and added an additional check self.assertEqual(labels.dtype, np.int64). Please LMK if it's fine or not.

Thanks again for reviewing this!

QLutz commented 3 years ago

Hi,

The build failed due to unrelated issues that arose after you opened the PR. Can you merge with the latest commit of develop to correct them?

Thanks for the additional check! Also, if you happen to be able to test the algorithm on a graph that needs 64-bit indexing, do not hesitate to give us feedback (especially if there are any issues).

Thanks for contributing!

fjsj commented 3 years ago

Thanks for checking.

Failed again, this time on Mac setup at "Installing iTunes, iTunes Device Support Update, Security Update 2020-005, Safari, Command Line Tools (macOS High Sierra version 10.13) for Xcode".

Tested on my local Mac, working fine.

I'll let you folks know once I test it on the huge graph, thanks!

QLutz commented 3 years ago

I've tried to make a lighter update for Travis not to timeout. Could you give it a try?

We're looking forward to hearing from you then!

codecov[bot] commented 3 years ago

Codecov Report

Merging #456 (36bf889) into develop (4bb8d35) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #456   +/-   ##
========================================
  Coverage    97.96%   97.97%           
========================================
  Files          167      167           
  Lines         7383     7402   +19     
========================================
+ Hits          7233     7252   +19     
  Misses         150      150           
Impacted Files Coverage Δ
sknetwork/clustering/louvain.py 100.00% <100.00%> (ø)
sknetwork/clustering/louvain_core.pyx 100.00% <100.00%> (ø)
sknetwork/clustering/tests/test_louvain.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4bb8d35...36bf889. Read the comment docs.

QLutz commented 3 years ago

Closing this now but do not hesitate to tell us how the package behaves on huge graphs.

Thanks a lot for the contribution!