Closed alvorithm closed 2 years ago
I wrote a basic slice sampler in Pyro that we can consider moving upstream in the future. For the time being, our custom implementation has more features though.
Some notes regarding the Pyro implementation:
test_logistic_regression
with mp on macOS was fine, running on Linux caused threading errors with fork
and pickling errors with spawn
available_cpu
: setting available_cpu=1
disables all multiprocessing if num_chains>1
I think this is mostly resolved now @jan-matthis @michaeldeistler : we have a separate sampler interface, and we have extra pyro
MCMC methods. The benchmark between them is missing, but I don't see this as an urgent problem.
I agree, we can close this. The use-case for numpy is quite clearly the vectorization. We might reconsider when pyro adds this feature.
Problem
For performance reasons, we are using a home-grown slice sampler programmed by Conor in numpy. We don't know if this is strictly necessary and why.
Solution
Benchmark slice-np against the pyro samplers and determine whether and under which precise circumstances there is a performance gap between slice-pyro and slice-np. If possible, reduce our dependency to Pyro sampling methods, which are more capable and will be externally maintained. @jan-matthis
Follow-up work
mcmc_method
string be explicit about pyro vs. numpy (e.g.slice_pyro
, notslice
. Use underscores as they facilitate identification in parameterized pytests).Posterior
object would receive asampler
and not just apotential_function
. @meteore