elfi-dev / elfi

ELFI - Engine for Likelihood-Free Inference
http://elfi.readthedocs.io
BSD 3-Clause "New" or "Revised" License
267 stars 60 forks source link

Fix BOLFI parallelisation #481

Closed uremes closed 5 months ago

uremes commented 5 months ago

Summary:

copy kernel from gpy regression model gp_params to avoid the pickle issue reported here and allow BOLFI parallelisation also when a non-default kernel is used. fixes #263

How to test:

the pickle error is observed when we sample from a target_model that has a kernel in gp_params and either ipyparallel or multiprocessing client is used. for example the example code provided in #263 results in an error with the current ELFI version but works with the updated version.

Please make sure

If your contribution adds, removes or somehow changes the functional behavior of the package, please check that

and the proposed changes pass all unit tests (check step 6 of CONTRIBUTING.rst for details)

Copyright and Licensing

Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company):

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: