-
Notifications
You must be signed in to change notification settings - Fork 60
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
Use dill
instead of pickle
for processing .pkl
files
#354
Conversation
dill
instead of pickle
for processing .pkl
files
dill
instead of pickle
for processing .pkl
filesdill
instead of pickle
for processing .pkl
files
dill
instead of pickle
for processing .pkl
filesdill
instead of pickle
for processing .pkl
files
dill
instead of pickle
for processing .pkl
filesdill
instead of pickle
for processing .pkl
files
@maronuu Thank you for the suggestion! I have some questions.
|
@kitagry Thank you for the comment! I added some notes about the storage usage and compatibility in the PR description. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
… feature/support_dill
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.