A reportengine app to perform PDF fits using arbitrary parametrisations.
Documentation regarding the usage and installation is available at https://hep-pbsp.github.io/colibri/
- Perform PDF fits using flexible parametrisations
- Support for JAX-based computations (CPU by default)
- Optional GPU (CUDA) support for accelerated JAX operations
- Command-line scripts for common workflows (
colibri
,evolve_fit
, etc.) - Integration with external PDF model repositories
This section covers installing colibri
in various ways.
You can install colibri easily by first cloning the repository and then using the provided environment.yml
file
git clone https://github.com/HEP-PBSP/colibri
cd colibri
from your conda base environment run
conda env create -f environment.yml
This will create a colibri-dev
environment installed in development mode.
If you want to use a different environment name you can run:
conda env create -n myenv -f environment.yml
If you don't want to clone the repository and don't need to work in development mode you can follow the installation instructions below.
Note: Most of the
colibri
dependencies are available in the PyPi repository, however non-python codes such as LHAPDF and pandoc won’t be installed automatically and need to be manually installed in the environment. Because of this we recommend to use a conda environment.
Create a conda environment from your base environment, for instance
conda create -n colibri-dev python>=3.11
In this new environment install the following conda packages
conda install mpich lhapdf pandoc mpi4py ultranest pip
After having completed this you can simply install the rest of the dependencies with pip
:
python -m pip install git+https://github.com/HEP-PBSP/colibri.git
Note, this will install the latest development version, if you want to install a specific release you can specify the version, for instance for v0.2.0 you can use the following command
python -m pip install git+https://github.com/HEP-PBSP/colibri.git@v0.2.0
to verify that the installation went through
python -c "import colibri; print(colibri.__version__)"
colibri --help
The installation instructions shown above will install jax in cpu mode. It is however possible to run colibri fits using gpu cuda support too. To do so, after installing the package following one of the methods shown above, if you are on a linux machine you can install jax in cuda mode by running
pip install -U "jax[cuda12]" -f https://storage.googleapis.com/jax-releases/jax_releases.html
Note: It is possible to run fits using float32 precision, the only way of doing so currently is to apply a patch to ultranest so that the json.dump is compatible. To do that, follow the instructions:
git clone git@github.com:LucaMantani/UltraNest.git
cd UltraNest
git switch add-numpy-encoder
pip install .
Usage examples such as the implementation of a PDF model and running of a PDF fit can be found under Tutorials in the Documentation.
We welcome bug reports or feature requests sent to the issue tracker. You may use the issue tracker for help and questions as well.
If you would like contribute to the code, we ask you to kindly follow the NNPDF Contribution Guidelines.
When developing locally, before committing please test your changes by running pytest
from the root of the repository.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation.
Artwork by @qftoons