Closed maronuu closed 6 months ago
@maronuu Thank you for the suggestion!
I have some questions.
dill
load the object dumped by pickle
library? I think it is very important for compatibility@kitagry Thank you for the comment! I added some notes about the storage usage and compatibility in the PR description.
Thank you!
Introduce
dill
library as a serializer instead ofpickle
for all.pkl
files.gokart has its own file processors for various file formats. For
.pkl
files, we have used standardpickle
library. However, it cannot handle a class or function whose metadata is dynamically determined when initialization.For example, the following code is a class that update its own method
run
when initialization by using wrapperplus1
.pickle
library cannot handle such cases. Thus we introducedill
, which is built onpickle
and can handle more various objects.cloudpickle
is also another potential candidate, but in terms of longer history and more users, we adoptdill
. Note that objects that can be serialized bypickle
are also serialized bydill
(https://dill.readthedocs.io/en/latest/#basic-usage ).Compatibility
As mentioned in doc, objects that can be serialized by
pickle
are serialized bydill
. Additionally, we confirm the objects dumped bypickle
are loaded viadill.load
.For the storage size, we confirm that the sizes of objects serialized by
pickle
ordill
are the same.