This package is to JLD2 what PyCallJLD is to JLD, implementing a serializer for saving and loading PyCall PyObject
s with JLD2.
Please see the official documentation for usage and contribution guidelines.
Documentation | Coverage | CI Status | Releases |
---|---|---|---|
Dependents | Issues | JuliaHub Status | Downloads |
Please see the documentation for full usage.
To save and load JLD2
, load PyCall
, JLD2
, and PyCallJLD2
in the same scope as where you intend to use the JLD2.save
and JLD2.load
functions.
If you are coming from PyCallJLD
, simply replace JLD
with JLD2
everywhere in your usage.
The following example is take from PyCallJLD for direct comparison:
using PyCall, JLD2, PyCallJLD2
@pyimport sklearn.linear_model as lm
# Create some Python objects
m1 = lm.LinearRegression()
m2 = lm.ARDRegression()
# Save them to models.jld2
JLD2.save("models.jld2", "mods", [m1, m2])
# Load them back
models = JLD2.load("models.jld2", "mods")
# Do a dance🕺
Just as in PyCallJLD, these objects are saved with pickle.dumps
.
The following authors are responsible for authoring this package:
- Sasha Petrenko sap625@mst.edu @AP6YC
This package is heavily based upon the PyCallJLD.jl
package; the funky-monkey-wrenching of PyCall ccall
s, pointers, and other low-level tomfoolery would have been arcane and indecipherable without this prior work.
This package merely modifies its internal usage to match the modified JLD2
API for custom serialization.
This package uses the MIT License.