blackjax-devs / blackjax

BlackJAX is a Bayesian Inference library designed for ease of use, speed and modularity.
https://blackjax-devs.github.io/blackjax/
Apache License 2.0
806 stars 105 forks source link

Draft #669

Closed reubenharry closed 4 months ago

reubenharry commented 4 months ago

Remove option to give initial_position from run_inference_algorithm.

Description:

run_inference_algorithm currently uses a try-except clause to allow the user to either provide an initial position or an initial state. This has led to some problems, when the except clause fails to trigger.

More broadly, there doesn't seem to be a good reason to

Solution:

Make run_inference_algorithm only take initial_state, so that the caller of run_inference_algorithm is responsible for providing initial_state from initial_position, rather than deferring this task.

A few important guidelines and requirements before we can merge your PR: