-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Serialization is used to transfer objects between processes, nodes, or even between windows and linux. It is also widely used in parallel program design. However, the cython objects such as ct.Solution and ct.Reaction cannot be serialized due to lack of serialization support.
refer to https://snorfalorpagus.net/blog/2016/04/16/pickling-cython-classes/. It seems simple to support serialization in python using pickle.
I tried to use monkey patching to assign __reduce__() method to Reaction object, but it is forbidden by python. So I think it is better to be implemented in cython layer.
Think about this scenario: I can save the Solution object or even FreeFlame object to a *.pkl file in Linux and send it to someone or forum. The receiver can simply load it in Windows and help me to check what is going wrong.