Repository navigation
Add HITS algorithm benchmark to benchmark suite - #8625
Conversation
dschult
left a comment
There was a problem hiding this comment.
This looks helpful!
My only comment/question is whether we should use a seed parameter for the construction of the graphs. Would that reduce variability in the timing from run to run?
Great catch, an oversight on my part! I seeded the graph instances but still see quite a bit of variability (i.e. 70% on one machine, almost 2x on another) particularly for the smallest graph (i.e. barabasi_albert w/ 1000 nodes). |
Peiffap
left a comment
There was a problem hiding this comment.
LGTM, just left some inline nits.
Co-authored-by: Mridul Seth <[email protected]> Co-authored-by: Dan Schult <[email protected]>
Co-authored-by: Gilles Peiffer <[email protected]>
|
I rebased on None of this has any bearing on whether to add these HITS benchmarks, but it's a nice confirmation the CI benchmarking machinery is working now! |
dschult
left a comment
There was a problem hiding this comment.
Is there a reason to have the setup method rather than just defining graphs_dict in the class definition (like _graphs)?
Looks good!
Probably not - I copied/pasted the benchmark class from |
* BENCH: Add hits alg benchmarks. * MAINT: rm unused random import. Co-authored-by: Mridul Seth <[email protected]> Co-authored-by: Dan Schult <[email protected]> * Apply suggestions from code review Co-authored-by: Gilles Peiffer <[email protected]> --------- Co-authored-by: Mridul Seth <[email protected]> Co-authored-by: Dan Schult <[email protected]> Co-authored-by: Gilles Peiffer <[email protected]>
See #8620 for motivation.
Unfortunately the old implementation of HITS was removed so long ago (nx version 2.6(!)) reliably building old/new NetworkX for comparison no longer seems to be possible, at least with a Python version that's still supported. You can probably do so if you go all the way back to Python 3.9, but Python itself has changed so much since them (esp. with faster CPython) that it's not really a meaningful comparison.
One thing you can do in principle is check different scipy versions by adding e.g.
"1.16", "1.17"to the scipy versions in the asv conf. I did so and ran onmainto test the different ARPACK implementations, but didn't see a significant difference.Anyways - not necessarily useful for #8620 given the support window issues, but potentially useful for folks hacking on hits moving forward!