Join the newly launched
Discord community for real-time discussions, peer support, and direct interaction with the Meridian team!
schema.serde.meridian_serde.MeridianSerde
Stay organized with collections
Save and categorize content based on your preferences.
Serializes and deserializes a Meridian model into an MmmKernel proto.
Inherits From: Serde
Methods
deserialize
View source
deserialize(
serialized: kernel_pb.MmmKernel,
serialized_version: str = '',
distribution_function_registry: (schema.serde.distribution.FunctionRegistry | None) = None,
eda_function_registry: (schema.serde.distribution.FunctionRegistry | None) = None,
force_deserialization=False
) -> model.Meridian
Deserializes the given MmmKernel proto into a Meridian model.
| Args |
serialized
|
The serialized object in the form of an MmmKernel proto.
|
serialized_version
|
The version of the serialized model. This is used to
handle changes in deserialization logic across different versions.
|
distribution_function_registry
|
Optional. A lookup table that maps string
keys to custom functions to be used as parameters in various
tfp.distributions.
|
eda_function_registry
|
A lookup table containing custom functions used by
EDASpec objects.
|
force_deserialization
|
If True, bypasses the safety check that validates
whether functions within a function registry have changed after
serialization. Use with caution. This should only be used if you have
intentionally modified a custom function and are confident that the
changes will not affect the deserialized model. A safer alternative is
to first deserialize the model with the original functions and then
serialize it with the new ones.
|
| Returns |
|
A Meridian model object.
|
serialize
View source
serialize(
obj: model.Meridian,
model_id: str = '',
meridian_version: semver.VersionInfo = _VERSION_INFO,
include_convergence_info: bool = False,
distribution_function_registry: (schema.serde.distribution.FunctionRegistry | None) = None,
eda_function_registry: (schema.serde.distribution.FunctionRegistry | None) = None
) -> kernel_pb.MmmKernel
Serializes the given Meridian model into an MmmKernel proto.
| Args |
obj
|
The Meridian model to serialize.
|
model_id
|
The ID of the model.
|
meridian_version
|
The version of the Meridian model.
|
include_convergence_info
|
Whether to include convergence information.
|
distribution_function_registry
|
Optional. A lookup table that maps string
keys to custom functions to be used as parameters in various
tfp.distributions.
|
eda_function_registry
|
A lookup table that maps string keys to custom
functions to be used in EDASpec.
|
| Returns |
An MmmKernel proto representing the serialized model.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-13 UTC.
[null,null,["Last updated 2025-11-13 UTC."],[],[]]