schema.serde.eda_spec.EDASpecSerde

Serializes and deserializes an EDASpec object into an EDASpec proto.

Inherits From: Serde

function_registry A lookup table containing custom functions used by EDASpec objects. It's recommended to explicitly define the custom functions instead of using lambdas, as lambda functions may not be serialized successfully.

function_registry

Methods

deserialize

View source

Deserializes the EDASpec proto.

Args
serialized A serialized EDASpec object.
serialized_version The version of the serialized Meridian model. This is used to handle changes in deserialization logic across different versions.
force_deserialization If True, bypasses the safety check that validates whether functions within function_registry have changed after serialization. Use with caution.

Returns
A deserialized EDASpec object.

serialize

View source

Serializes the given EDASpec object into an EDASpec proto.