elfi-dev / elfi

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

Fix surrogate model copy operation #474

Closed uremes closed 5 months ago

uremes commented 5 months ago

Summary:

GPyRegression class both overrides copy.copy with its own copy method and tries to use copy.copy inside the copy method so that both copy methods result in a recursion error. Removing the override resolves the error.

How to test:

Run the BOLFI notebook and try bolfi.target_model.copy() and/or import the copy module and try copy.copy(bolfi.target_model).

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: