DeferredFactory#
- pydantic model pymc_marketing.serialization.DeferredFactory[source]#
Serializable recipe for creating objects with non-serializable state.
Instead of storing a live object (e.g., a Prior with PyTensor tensor parameters), store the factory function path and its scalar arguments. Call
resolve()at build_model() time to create the actual object.Methods
DeferredFactory.__init__(**data)Create a new model by parsing and validating input data from keyword arguments.
Reconstruct a DeferredFactory from a dict.
Import the factory function and call it with kwargs.
Serialize the deferred factory to a dict.