API Reference#
Full reference documentation for all public functions and classes in nqxpack.
Top-level functions#
Saves an object to a file, using the NQXPack format. |
|
Loads an nqxpack file. |
|
Serialize an object to a JSON-serializable form similar to what hydra can process. |
|
Deserialize an object from a JSON-serializable produced by serialize_object. |
Registry#
The nqxpack.registry submodule exposes helpers for extending the serialisation
system with custom types.
Register a custom serialization function and deserialization function for a given class. |
|
Register a simple serialization function for a class that just serializes the given attributes. |
|
Register the closure resulting from a function to have a simple serialization. |
|
Used to store binary blobs or large serialized objects, which may be needed when serializing some custom types. |
Built-in registry modules#
nqxpack ships with serialisers for the following libraries. They are imported
automatically when nqxpack is imported.
Module |
Covered types |
|---|---|
|
|
|
JAX arrays, dtypes |
|
|
|
|
|
NetKet operators |
|
OmegaConf / Hydra config nodes |