Skip to content

Installation

Time: about 5 minutes, plus the download · You need: Python 3.11, 3.12 or 3.13 on Windows or Linux (x86-64). You'll end with: mli and the ml4 engine it reads installed in one environment.

mli is published on PyPI as compiled wheels. You install parleml-mli and import parleml_mli. Installing it also installs ml4 (parleml-ml4), the engine whose models it explains.

Only scoring a model from ParleML?

You don't need this page. A registered model's scoring package has a requirements.txt that names the ml4 and mli versions it needs. Install that instead: see Use your model in Python.

1. Create an environment

uv venv --python 3.12
python3.12 -m venv .venv
source .venv/bin/activate
py -3.12 -m venv .venv
.venv\Scripts\Activate.ps1

2. Install mli

uv pip install parleml-mli
pip install parleml-mli

There are no extras to choose. Every analysis ships in the base install: all supported model families, SHAP, Optuna tuning, fairness, word clouds and the EDA backend.

3. Check it

import parleml_ml4, parleml_mli

print(parleml_mli.__version__)

Wheels are platform-specific

The wheels are compiled native code, so each one targets one operating system, CPU and Python version (for example cp312 on win_amd64). pip picks the right one. If it finds none, check your Python version (3.11 to 3.13) and platform. On macOS, run ParleML in Docker instead: see Run ParleML.

Optional: Graphviz for tree diagrams

Pictures of trees (native model trees, the surrogate and the error tree) are drawn by the Graphviz dot program. It is a system program, not a Python package. Without it, everything else works and only the tree images are skipped.

winget install Graphviz.Graphviz

Then add C:\Program Files\Graphviz\bin to your user PATH (winget does not do it).

brew install graphviz
sudo apt-get install graphviz

Check it with dot -V.

Saving a chart as a static image needs Kaleido, which is not installed with mli (pip install kaleido). Without a working Kaleido, the chart is written as HTML instead. See Visualizations.

Details: working from a ParleML source checkout

Inside the ParleML repository, use the workspace environment rather than installing mli on its own. From the repository root:

uv sync --package mli --extra docs
uv run --package mli --extra docs python mli/scripts/gen_config_reference.py
uv run --package mli --extra docs mkdocs build --strict -f mli/mkdocs.yml

The API pages use static source analysis. The configuration-table generator imports the live configuration classes, so run it in the workspace environment.

Next

  • Quickstart: profile a classifier, then derive its trust summary and model card.