Installation Guide#
As smolgp extends the functionality of tinygp, it utilizes a number of fundamental tinygp functions and classes and so requires tinygp as a dependency.
Installing on GPU
If you want to take advantage of the GPU-optimized parts of the code (e.g. the parallel solvers), you’ll want to install the CUDA version of jax. You can do that with uv like so:
uv add smolgp[cuda]
or uv add smolgp[cuda12] or uv add smolgp[cuda13] for a specific version.
Using uv#
The recommended way to install the most recent stable version of smolgp is to use uv:
uv add smolgp
To install in the current uv venv but not add it to pyproject.toml, you can always do
uv pip install smolgp
Of course, you can always just use pip:
python -m pip install smolgp
We do not recommend using conda.
From source#
Alternatively, you can get the source:
git clone https://github.com/smolgp-dev/smolgp.git
cd smolgp
uv pip install -e .
Or, to add to another uv enviornment:
uv add --editable /path/to/smolgp
Tests#
If you installed from source, you can run the unit tests. From the root of the source directory, run:
uv sync --group test
uv run -m pytest
Or in one line (can specify python version)
uv run --group test --python 3.13 -m pytest -n auto tests
To run a single test, e.g.
uv run pytest tests/test_kernels.py
To run with coverage
uv run --group test --python 3.13 -m pytest --cov --cov-branch --cov-report=xml -n auto tests