sbi-dev / sbi

Simulation-based inference toolkit
https://sbi-dev.github.io/sbi/
Apache License 2.0
594 stars 152 forks source link

We depend on a custom numpy implementation of slice sampling #80

Closed alvorithm closed 2 years ago

alvorithm commented 4 years ago

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

jan-matthis commented 4 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:

janfb commented 2 years ago

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.

michaeldeistler commented 2 years ago

I agree, we can close this. The use-case for numpy is quite clearly the vectorization. We might reconsider when pyro adds this feature.