Serializes and deserializes a Meridian prior distributions container into a Distribution
proto.
Inherits From: Serde
schema
.
serde
.
distribution
.
DistributionSerde
(
function_registry
:
FunctionRegistry
)
Methods
deserialize
deserialize
(
serialized
:
MeridianPriorDistributions
,
serialized_version
:
str
=
''
,
force_deserialization
:
bool
=
False
)
->
pd
.
PriorDistribution
Deserializes the PriorTfpDistributions
proto.
WARNING: If any custom functions in the function registry are modified after serialization, the deserialized model can differ from the original model, as the original function's behavior is no longer guaranteed. This will result in an error during deserialization.
For users who are intentionally changing functions and are confident that the changes will not affect the deserialized model, you can bypass safety mechanisms to force deserialization. See example:
serialized
PriorDistributions
object.serialized_version
force_deserialization
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.
PriorDistribution
object. serialize
serialize
(
obj
:
pd
.
PriorDistribution
)
->
meridian_pb
.
PriorTfpDistributions
Serializes the given Meridian priors container into a MeridianPriorDistributions
proto.



