nqxpack.serialize_object

nqxpack.serialize_object#

nqxpack.serialize_object(obj)[source]#

Serialize an object to a JSON-serializable form similar to what hydra can process.

To deserialize the object, use deserialize_object.

This also accepts an asset_manager argument that can be used to store large objects that should not be serialized in the JSON file. If the asset manager is not specified, this function might fail.

Parameters:
  • obj – The object to serialize.

  • path – The path to the object, as a tuple of strings. This is optional, and is used internally to provide better error messages.

  • asset_manager – An instance of an AssetManager, which is used to store large objects