naming#

pymc_marketing.mmm.builders.factories.naming(key)[source]#

Name key on any deserialization failure raised inside the block.

YAML is the entry point most likely to be hand-edited, and a bare DeserializableError only dumps the offending sub-dict, which is hard to trace back to a config entry. ModelConfigError used to name every bad key before dict-format priors were removed; this preserves that.

DeserializableError reports “use register_deserialization to add a mapping”, which is the wrong advice when a deserializer did match and failed for some other reason. In that case __cause__ holds the actual reason (e.g. PyMC doesn't have a distribution of name 'Nrmal'), so surface that instead.