Unable to use the budget allocation function for DelayedSaturatedMMM model

Hi there, I just built an mmm model using DelayedSaturatedMMM… I’m trying to create budget allocation scenario based on this example ()… However, when i called out the code block below, it gave me an error that says ‘DelayedSaturatedMMM’ object has no attribute ‘allocate_budget_to_maximize_response’

Here’s my code:

## Load pre trained model
mmm = DelayedSaturatedMMM.load("direct_mmm_with_lift_test_v2.nc")

total_budget = 1  
channels = spend_cols
budget_per_channel = total_budget / len(channels)
initial_budget_dict = {channel: budget_per_channel for channel in channels}
min_budget, max_budget = 0.05, .4
budget_bounds = {channel: [min_budget, max_budget] for channel in channels}

menten_params = mmm.compute_channel_curve_optimization_parameters_original_scale(

#### the code block below raised an error ####
response = mmm.allocate_budget_to_maximize_response(


Can you show which PyMC-Marketing version are you using?

Hi Carlos, I’m using the 0.6.0 version…
Screenshot 2024-06-19 at 12.26.03 PM