You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that a lot of the examples using pygmo for optimization have to rely on some "hacks" (re-initializing the object for every thread: can be expensive and clunky) (one, two) to make the object pickle-able so the optimization can be parallelized. The fundamental issue as I understand it is the TransferTrajectory class: cloudpickle can't pickle this, and for me the lambda trick also doesn't circumvent this.
However, pybind11 offers pickling support if you define the appropriate methods on the C++ side. Is this something that's maybe desirable?
The text was updated successfully, but these errors were encountered:
This would definitely be good to have, we just have not yet gotten around to it yet :) Can you explain why the lambda trick does not circumvent the issue in this case?
Hi!
I noticed that a lot of the examples using
pygmo
for optimization have to rely on some "hacks" (re-initializing the object for every thread: can be expensive and clunky) (one, two) to make the object pickle-able so the optimization can be parallelized. The fundamental issue as I understand it is theTransferTrajectory
class:cloudpickle
can't pickle this, and for me the lambda trick also doesn't circumvent this.However,
pybind11
offers pickling support if you define the appropriate methods on the C++ side. Is this something that's maybe desirable?The text was updated successfully, but these errors were encountered: