Open ashiklom opened 4 years ago
Hi Alexey,
thanks for reporting that. I urgently need to do a major cleanup for BT, just difficult to find the time at the moment. Will try to fix this very soon!
Best, Florian
I had restart working in parallel I think. My code is here.
https://github.com/woodwards/basgra_nz/blob/master/scripts/BC_BASGRA_BT.R
Trying to restart a sampler with parallel likelihood evaluation in a new session fails with
invalid connection
error. I think this is because the cluster object (cl
) stored with thesetup$likelihood
function is no longer valid in a new R session.Pseudocode to reproduce:
Currently, I'm working around this by re-creating the
BayesianSetup
object in the fresh R session and modifying thesamples
object'slikelihood
andposterior
:This seems to work fine, but is a bit clunky. One possible fix is to pass around the
cl
variable as an argument in those functions (instead of storing it with the function definition as a closure, which is my understanding of how the code works now).Related to #186.