-
Notifications
You must be signed in to change notification settings - Fork 565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception pickling kernels #605
Comments
I have run into the exact same problem. Unfortunately I can't use the same work around though. |
Exact same problem over here! Did anyone find a work-around or a fix? |
My work-around was to not store the GP/kernel and to re-instantiate it every time.. which isn't efficient, but worked for me because I'm using a mixture model. I didn't have the time to look into a fix. |
Has anyone been able to look into a fix? |
Same here. This issue makes it impossible to use GPy with multiprocessing for me. |
Another work-around for multiprocessing is to use the https://github.com/uqfoundation/multiprocess which has the exact same interface as the standard python multiprocessing, but uses dill instead of pickle as the backend. |
in my testing dill also triggers the exception |
for my use case I didn't actually require pickling kernels that have been used, so I restructured my code to copy the kernel and pass the copy to the GP instead, allowing the object holding the unused kernel to be pickled. This probably doesn't help most cases though, sorry |
I get this error when pickling a kernel once it has been used by a GP. Since the exception doesn't occur before this, I am assuming that the kernels are supposed to be picklable? The error is the same for other kernels I tried. It is also triggered by using
copy.deepcopy
.My intention was to save the unused kernel anyway, and so passing a copy to the GP solved my issue, but this might still be a bug that needs fixing?
The text was updated successfully, but these errors were encountered: