-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Serialization file format for arbitrary julia objects #7909
Comments
.jls? (Julia serialized) |
.dat is always good for a round of Twenty Questions. |
I think .jls is fine. Otherwise how about .js (JuliaSerialized) ;)? |
+1 for |
Allowing the user to define methods to serialize custom data types also kind of defeats the versioned file concept. The ability to deserialize depends on what is currently loaded into the environment, so the "version" of the format is kind of meaningless. |
We could explore using the serializer in |
Changed the title since the extension seems to be pretty much decided, so the issue now tracks the issue that there is no file format. |
I would also argue that if HDF5 can be made essentially as fast (which remains to be seen), we really shouldn't encourage this---there are many advantages in a stable, nearly-human-readable (thanks to |
Like @timholy I think that HDF5/JLD is the way to go unless there is reason to believe it can never be made fast enough. |
#7893 now suggests HDF5/JLD can be plenty fast. |
I agree completely --- originally I didn't really want to use serialize/deserialize for anything except message passing, where it is needed to handle details like tracking |
How performant is HDF5 on Mac or Windows? Maybe I need to wean myself off past python experience but being able to quickly serailize whatever state you are working on to look at it later is useful. I agree that this is not a good format for "permanent" storage, its more useful for "I'll look at this tomorrow" type storage. I guess if HDF5 is performant enough, and it is easy to install on all platforms then it fills this role quite nicely. |
We could perhaps add |
Dunno, I've only tested Linux. I agree with the convenience of serialization, but I've found that for my needs There are some limitations, though, like not saving functions. |
Saving functions could probably be added by imitating what the code in Base does, but it seems like a fairly marginal need. |
After working on JuliaIO/HDF5.jl#132, I'm not sure where to go next here. For @jakebolewski and @jiahao's cases, which involve large arrays of numbers, strings, and immutables, JLD can now beat I am still of the opinion that the format used by |
I'd like second Simonster's point. Unless we fix the issues with JLD, it cannot be a replacement for JLS. |
I fixed most of the issues with JLD in JLD2: https://github.com/simonster/JLD2.jl. It reads and writes valid HDF5 files in pure Julia (although for reading it only supports a subset of HDF5). It pretty much works, and it can be many orders of magnitude faster than JLD for the |
For 1.0 we should probably add the ability to write a small header giving the format version (and probably an ABI specifier). |
|
Python has pretty much standardized on using the .pkl file name extension for serialized python objects. What to call Julia's serialized object dumps? .jld is already taken.
The text was updated successfully, but these errors were encountered: