Installation#
To avoid dependency issues, it is recommended to create a new conda/mamba environment.
conda create -n gensbi python=3.12 -y
conda activate gensbi
To install, clone the repository and install dependencies:
pip install git+https://github.com/aurelio-amerio/GenSBI.git
If a GPU is available, it is advisable to install the cuda version of the package:
pip install "GenSBI[cuda12] @ git+https://github.com/aurelio-amerio/GenSBI.git"
Although not mandatory, it is recommended to install also the optional validation package, which provides utilities for evaluating inference performance:
pip install "GenSBI[validation] @ git+https://github.com/aurelio-amerio/GenSBI.git" --extra-index-url https://download.pytorch.org/whl/cpu
If you want to run the examples, install the GenSBI-examples repository:
pip install "GenSBI[examples] @ git+https://github.com/aurelio-amerio/GenSBI.git"
To install all the optional dependencies at once, run:
pip install "GenSBI[cuda12,examples,validation] @ git+https://github.com/aurelio-amerio/GenSBI.git" --extra-index-url https://download.pytorch.org/whl/cpu
Requirements#
Python 3.11+
JAX
Flax
(See
pyproject.tomlfor full requirements)