Can't log mmm model with pymc_marketing.mlflow.log_mmm

pymc version: 5.27.1

pymc marketing version: 0.18.2

I am getting the following error on pymc_marketing.mlflow.log_mmm

TypeError: log_model() got an unexpected keyword argument 'name'

 # Log model configuration (saturation, adstock, priors, etc.)
pymc_marketing.mlflow.log_mmm_configuration(mmm_all)

# Log model derived info - pass the PyMC model
pymc_marketing.mlflow.log_model_derived_info(mmm_all.model)

# Log sample diagnostics - pass the idata
pymc_marketing.mlflow.log_sample_diagnostics(mmm_all.idata, tune=FINAL_TUNE)

mlflow.log_params({"train_test_split_date": TRAIN_TEST_SPLIT_DATE})

# Log the full MMM model as deployable artifact
pymc_marketing.mlflow.log_mmm(
    mmm=mmm_all,
    include_last_observations=True,
    original_scale=True
)

Hi, thanks for pointing this out. I believe you can fix it by updating your mlflow to 3.0.1 better. What version are you on, mlflow.__version__?

We had some protection against this sort of bug but I think it might have been misconfigured. I’ve opened a PR to avoid this sort of thing bug : mlflow uses the name param on versions 3.0.0 and greater by daniel-saunders-phil · Pull Request #2339 · pymc-labs/pymc-marketing · GitHub. If you cannot update mlflow for whatever reason, you might watch that PR for updates.

PR’s been merged by the way, so it should disappear on the next release.

I’m running 2.22.0