PUMA: Plotting UMami Api#
The Python package puma provides a plotting API for commonly used plots in flavour tagging.
| ROC curves | Histogram plots | Variable vs efficiency |
|---|---|---|
![]() |
![]() |
![]() |
Installation#
puma can be installed from PyPI or using the latest code from this repository.
Install latest release from PyPI#
The installation from PyPI only allows to install tagged releases, meaning you can not
install the latest code from this repo using the above command.
If you just want to use a stable release of puma, this is the way to go.
Install latest version from GitHub#
This will install the latest version of puma, i.e. the current version
from the main branch (no matter if it is a release/tagged commit).
If you plan on contributing to puma and/or want the latest version possible, this
is what you want.
Install for development with uv (recommended)#
For development, we recommend using uv, a fast Python package installer and resolver. First, install uv:
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# Or with pip (If installing from PyPI, we recommend installing uv into an isolated environment)
pip install uv
Then clone the repository and install puma with development dependencies:
This will install puma in editable mode along with all development tools (testing, linting, etc.).
[!TIP] In order to use locally installed version of
pumain otheruv-managed projects, you can add the following to thepyproject.tomlof the other project:
Docker images#
The Docker images are built on GitHub and contain the latest version from the main branch.
The container registry with all available tags can be found here.
The puma:latest image is based on python:3.11.10-bullseye and is meant for users who want to use the latest version of puma. For each release, there is a corresponding tagged image.
You can start an interactive shell in a container with your current working directory
mounted into the container by using one of the commands provided below.
On a machine with Docker installed:
docker run -it --rm -v $PWD:/puma_container -w /puma_container gitlab-registry.cern.ch/aft/training-images/puma-images/puma:latest bash
On a machine/cluster with singularity installed:
singularity shell -B $PWD docker://gitlab-registry.cern.ch/aft/training-images/puma-images/puma:latest
The images are automatically updated via GitHub and pushed to this repository registry.


