rapidsai / cugraph

cuGraph - RAPIDS Graph Analytics Library
https://docs.rapids.ai/api/cugraph/stable/
Apache License 2.0
1.74k stars 304 forks source link

[BUG]: `plc.hits` does not raise after not converging after reaching max iterations #3972

Closed eriknw closed 1 year ago

eriknw commented 1 year ago

Version

23.12 dev

Which installation method(s) does this occur on?

No response

Describe the bug.

Unlike other power iteration methods, HITS does not raise upon reaching the maximum number of iterations without converging.

See here that it does not check the convergence criteria and raise if necessary: https://github.com/rapidsai/cugraph/blob/f4bcdc2667a15e2e5031987550322a9d29d8f713/cpp/src/link_analysis/hits_impl.cuh#L176-L192

For an example of expected behavior, here's Katz centrality: https://github.com/rapidsai/cugraph/blob/f4bcdc2667a15e2e5031987550322a9d29d8f713/cpp/src/centrality/katz_centrality_impl.cuh#L163-L168

Minimum reproducible example

Call with `max_iterations=1`.

Relevant log output

No response

Environment details

No response

Other/Misc.

Not having this behavior makes it difficult for nx-cugraph to match NetworkX.

Code of Conduct

ChuckHastings commented 1 year ago

Good catch. Will try to fix along with #3971.