Installation
These instructions require an authorised ammm checkout or private wheel.
The product, distribution and Python import package are named ammm.
The repository directory and GitHub repository remain ammm3.
Upgrading to 3.3.2
Version 3.3.2 intentionally breaks earlier import and saved-model contracts. The patch version number does not imply backward compatibility.
- Keep the previous release and its environment for existing saved models, runs and evidence. Those artefacts retain their original identities.
- Install 3.3.2 in a separate environment using the source or wheel supplied through the authorised private distribution route.
- Update Python imports, module commands and dependency declarations to
ammm. - Use
AMMM_SHOW_BANNER,AMMM_RUNME_SUBPROCESSandAMMM_PYTENSOR_CACHE_DIRwhere you configure these optional runtime settings. The old prefixes are not accepted as aliases. - Update metadata consumers to read
ammm_version, the model classammm.mmm.panel.PanelMMM, and the model typeammm PanelMMM. Current default and demo diagnostic profiles useammm_mmm_default_v1andammm_demo_v1respectively. - Create new fitted runs for use with this release. There is no import alias,
saved-model migration or supported metadata-editing shortcut. Keep the
original release for earlier runs;
check=Falseis not an upgrade path.
For example, use these imports in updated Python code:
from ammm.pipeline.terminal import TerminalPipelineReporter, format_elapsed
from ammm.mmm.panel import PanelMMM
The rename does not change estimator equations, priors, diagnostic thresholds or operation gates. It does not extend statistical qualification. Application wrappers and notebooks must update their own integrations separately.
Prerequisites
| Item | Notes |
|---|---|
| Python | The package requires Python 3.11 or later. The repo development environment uses Python 3.12. |
| Package access | Use an authorised checkout or the private wheel for this version. |
| Writable temp/cache directory | Useful for PyTensor compiledir and local verification commands. |
Install the private wheel
Download ammm-3.3.2-py3-none-any.whl through the authorised private
distribution route. Create a separate environment and replace the example
path below with the downloaded wheel’s path:
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install /path/to/ammm-3.3.2-py3-none-any.whl
The wheel provides the library and its bundled resources. Use a checkout for the repository’s demo scripts, development commands and documentation sources.
Recommended setup: Conda + editable install
This is the supported local development path for the repository.
conda env create -f environment.yml
conda activate ammm-dev
python3 -m pip install -e .
This gives you:
- the repo-managed development environment from
environment.yml - an editable install, so local code changes are picked up immediately
Minimal pip install from source
If you do not want the full Conda environment, you can install ammm directly from the repository root.
Standard install
python3 -m pip install .
Editable install
python3 -m pip install -e .
Use the editable install if you are changing code, configs, or docs locally.
Optional extras
ammm defines a small set of optional extras in pyproject.toml.
| Extra | Install command | Use when you need |
|---|---|---|
lint | python3 -m pip install .[lint] | Ruff, MyPy, and related local linting tools |
test | python3 -m pip install .[test] | Pytest and test-only dependencies |
If you created the environment from environment.yml, most development
dependencies are already present.
The statistical scenario API is included in the standard install. Import
scenario objects from ammm.scenarios. ammm does not include a dashboard
or require Dash, Plotly or Flask. Application wrappers are separate projects.
Verify the install
A successful import alone does not confirm that Python selected this release. Run the following check in the environment where you installed ammm:
python3 - <<'PY'
from importlib.metadata import version
import ammm
assert version("ammm") == ammm.__version__ == "3.3.2"
print(f"ammm {ammm.__version__}")
print(f"Imported from: {ammm.__file__}")
PY
The path should point into the selected environment, or into src/ammm in
the intended checkout for an editable install. If it points elsewhere, select
the intended environment and repeat the installation.
Then check the public model import:
python3 -c "from ammm.mmm.panel import PanelMMM; print(PanelMMM.__name__)"
From a checkout, use the repository smoke target for an end-to-end check:
make smoke_mmm
If you are working on the repo itself, the main local verification commands are:
make test
make verify_local
make verify_package
Runtime defaults for restricted environments
Some local runs need writable cache directories. If you hit PyTensor compiledir or cache-permission issues, export the same defaults used by the repo verification scripts:
export PYTENSOR_FLAGS="base_compiledir=/tmp/pytensor,linker=py"
export JAX_PLATFORMS=cpu
export XDG_CACHE_HOME=/tmp
Next steps
- Read Quickstart: Python API if you want to fit a model directly from pandas data.
- Read Quickstart: YAML Builder if you want configuration-driven model construction.
- Read Quickstart: Pipeline Runner if you want a full structured run with staged artefacts.