Dependency update
GiulioRossetti opened this issue · comments
Hi @benedekrozemberczki ,
will it be possible to make the version requirements for numpy, networkx and pandas a little less stringent?
We are trying to update the dependency list of cdlib but it seems that the latest versions of such packages break all our krarateclub integrations.
Best,
Giulio
Hi @GiulioRossetti , I will look into this.
I can confirm that networkx
3.0 < makes breaking changes, as shown in the test cases.
FAILED test/community_detection_overlapping_test.py::test_danmf - ValueError: inconsistent shapes
====================== 1 failed, 46 passed, 851 warnings in 195.31s (0:03:15) =======================
This may be related to the change networkx
3.0 < made to return sparse arrays instead of matrices when calling certain methods. See one deprecation warning below.
test/community_detection_overlapping_test.py::test_danmf
test/community_detection_overlapping_test.py::test_danmf
/home/siuser/Developer/karateclub/karateclub/community_detection/overlapping/danmf.py:48: FutureWarning: adjacency_matrix will return a scipy.sparse array instead of a matrix in Networkx 3.0.
self._A = nx.adjacency_matrix(
To recreate this issue, just bump networkx
dependency in setup.py
to "networkx==3.0",
I need pandas 2.0. I can't use this :( Ed: Ok, this is an exaggeration :)
@WhatTheFuzz can you let me know what other issues involving networkx 3.0 are? I really want to include karateclub
in my Graph ML class and am willing to do the work if it isn't too extensive.
Ok, FWIW I am poking around here :)
install_requires = [
"numpy>=1.22.0",
"networkx>=3.0",
"decorator==5.1.*",
...
I got a little experience in this PR: benedekrozemberczki/littleballoffur#23
I am going to make karateclub
go with networkx>=3.1
now :)
Sorry, I didn't mean to leave you hanging! I was just going off of the unit tests before. I'm not exactly the best ML dev out there. I would definitely love to bump the dependencies so I can update my environments. Happy to bounce ideas off though.
Oh, no problem! I just kind of jumped on it :)
Hi there @rjurney do you want to go ahead?
As I see, in https://github.com/benedekrozemberczki/karateclub/blob/master/setup.py you have already relaxed requirements. But PyPi release still has quite strict requirements that get in the way with almost any other recent package. We got into install problem because of that in our project https://github.com/aimclub/GOLEM.
Could you consider making a minor release soon with updated dependencies?
@gkirgizov I am going to get back to this soon!
I am now to the point where my class starts Monday. I am looking at this.
Oh shit, this is that scikit-learn bug I ran into :( Woe is me, I've got just half an hour to try!
Gentlemen [ @benedekrozemberczki and @GiulioRossetti @WhatTheFuzz @gkirgizov ] please check out #150 🥳
Everything works in networkx 3.3 now! All unit tests pass. Please examine and merge 😁
Closing issue as PR was merged.
@LucaCappelletti94 much gracias!