zoj613/polyagamma

BENCH: Add `requirements-bench.txt` file to list required package versions to reproduce benchmarks plots.

zoj613 opened this issue · 0 comments

I recently discovered that the perfplot package introduced breaking changes since version 0.9.8 that truncate to int any values to perfplot.bench's n_range argument (see: nschloe/perfplot#153). This results in the script scripts/benchmark.py hanging indefinitely after a while. This because one of the inputs to n_range of perfplot is 0.1 and the perfplot.bench function truncates this value to 0.0 which leads to random_polyagamma hanging when disable_checks=True since 0.0 is not a valid value for the h parameter. Even if we change disable_checks=False, it will not help for versions of perfplot > 0.9.6 since the script will raise an exception for h <= 0. The sensible thing to do is to add a requirements-bench.txt file inside the scripts folder so that anyone running the benchmarks can reliably reproduce them. Something like the following should suffice:

# requirements-bench.txt
polyagamma>=1.3.1
pypolyagamma>=1.2.3
perfplot==0.9.6