pisa
pisa copied to clipboard
Prior class makes it impossible to pickle distribution makers
The Prior class uses a lot of lambda functions and not top-module level functions (e.g. llh within the _init* functions). That makes it impossible to pickle them. That is an issue, because multiprocessing uses pickle. So we can not pass a distribution maker as an argument to any process parallelized with multiprocessing. I have encountered this problem while trying to parallelize a MCMC sampling algorithm. This algorithm needs a metric function which itself gets an distribution maker as argument. For now the MCMC sampling function in analysis will only support single CPU execution (very slow), I will add an multi CPU workaround to the MCMC example notebook.