# Migration to PyMC-Marketing 1.x

This repository is the PyMC-Marketing 1.x-native line of `pymc-marketing-sweep`.

## What changed

- Minimum Python is now 3.12.
- Runtime dependency is `pymc-marketing>=1.0.0,<2`.
- PyMC is constrained to the 1.0-compatible 6.0 line.
- PyMC-Extras is constrained to `>=0.11,<0.13`.
- ArviZ and arviz-stats target the 1.2+ split stack.
- The old `compat.py` dual-version loader has been removed.
- Models load directly with `from pymc_marketing.mmm import MMM` and `MMM.load(...)`.
- Fitted data is treated as an `xarray.DataTree`; posterior access uses `MMM.posterior`.
- Approximate candidate prediction replaces the `/posterior` DataTree group in a temporary tree before calling `MMM.predict_posterior`.
- Production recommendations remain native `Prior(...)`, `LogNormalPrior(...)`, or `LaplacePrior(...)` code.
- Legacy dict-style PyMC-Marketing model priors are not a supported production configuration path.
- The density engine now supports `Prior("Exponential", scale=...)`, which appears in current hierarchical PyMC-Marketing 1.x examples.
- A real PyMC-Marketing 1.x integration test covers fit, save, load, sweep, recommendation and prediction.

## Validation commands

```bash
python -m pip install -e ".[dev]"
pytest -q -m "not integration"
pytest -q -m integration
pmm-sweep --help
```

The integration test requires a real PyMC-Marketing 1.x installation and performs a small MCMC fit.
