benedekrozemberczki/karateclub

Update requirements

WhatTheFuzz opened this issue · 4 comments

As it stands, setup.py has the following requirements which specify maximum versions:

install_requires = [
    "numpy<1.23.0",
    "networkx<2.7",
    "decorator==4.4.2",
    "pandas<=1.3.5"
]

Is there a reason for the maximum versions, such as expired deprecated features used by karateclub? In my personal research, and in using the included test suite via python3 ./setup.py test, I have not encountered issues in upgrading the packages.

$ pip3 install --upgrade --user networkx numpy pandas decorator

$ pip3 list | grep "networkx\|numpy\|decorator\|pandas"
decorator              5.1.1
networkx               2.8.8
numpy                  1.23.5
pandas                 1.5.2

Running the tests with these updated package yields the following:

$ cd karateclub/
$ pytest
...
47 passed, 2540 warnings in 210.58s (0:03:30) 

Yes, there are lots of warnings. Many are DeprecationWarnings. The current requirements generate 855 warnings.

$ cd karateclub/
$ pip3 install --user .
$ pytest
...
47 passed, 855 warnings in 225.49s (0:03:45)

I suppose the question is: even with additional instances of DeprecationWarning, can we bump up the maximum requirements for this package? Or would the community feel better addressing the deprecation issues before continuing?

For context, my motivation is to keep this package current; I'm currently held back (not actually, but per the setup requirements) by this package's maximum requirements. Does anyone have any thoughts?

Hi there @WhatTheFuzz ,

Do you want to PR the proposed change?

Bests,

Benedek

Yep, I'll submit one this afternoon! I love the work, by the way; we recently got accepted to present at a conference using karateclub to implement our upstream learning. I definitely appreciate your research.

Resolved in #120.

For anyone else stumbling on this issue, I updated networkx to version 3.0rc1, and everything seems to be working well.

pip3 install --upgrade networkx==3.0rc1
pip3 list | grep networkx        
networkx           3.0rc1

cd karateclub/

pytest

====================================================== 47 passed, 855 warnings in 159.33s (0:02:39) ======================================================

I plan to address the deprecation warnings in a future issue/PR. Cheers!