ysig / GraKeL

A scikit-learn compatible library for graph kernels
https://ysig.github.io/GraKeL/
Other
601 stars 97 forks source link

RandomWalk kernel incompatible with SciPy version >=1.14.0 #111

Closed klausweinbauer closed 1 month ago

klausweinbauer commented 2 months ago

Describe the bug The arguments for the function scipy.sparse.linalg.cg changed. tol was deprecated and got replaced by rtol in version 1.14.0 [1]

To Reproduce

from grakel.graph import Graph
from grakel.kernels import RandomWalk, RandomWalkLabeled

RandomWalk().fit_transform([Graph([(0, 1)])])
RandomWalkLabeled().fit_transform([Graph([(0, 1)], node_labels={0: 0, 1: 0})])

Error TypeError: cg() got an unexpected keyword argument 'tol'

I'll provide a PR.

ysig commented 1 month ago

@klausweinbauer sorry for the late reply. Thank you! Please merge both requests into one and make them backwards compatible and I will pull them :))

klausweinbauer commented 1 month ago

The explicit datatype specification is at least backward compatible with SciPy Version 1.0.0 [1]. For the argument name change, I added the version requirement. Thanks :)