Using manual deps management¶
This page explains how to turn off automatic deps management and handle dependencies yourself.
1. Install the hardware backend¶
Install only the backend matching your setup.
uv add "raitap[torch-cuda]"
pip install "raitap[torch-cuda]"
CPU |
CUDA |
Intel GPU |
|
|---|---|---|---|
Torch |
|
|
|
ONNX |
|
|
|
Note
CUDA = NVIDIA GPUs.
torch-inteluses the Intel XPU API;onnx-inteluses the OpenVINO ONNX Runtime.Apple MPS support is coming soon.
CUDA / Intel wheels do not live on PyPI. Re-declare the index routing per hardware:
Important
Replace BACKEND in the snippets below with torch or onnx depending on your setup.
On Linux, the plain torch package from PyPI is the CUDA build. Route it to the CPU index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-cpu]>=0.9",
"torch; sys_platform == 'linux'", # redeclare to make the index below apply
"torchvision; sys_platform == 'linux'", # redeclare to make the index below apply
]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cpu" }
torchvision = { index = "pytorch-cpu" }
torch does not publish separate CUDA builds on PyPI. You control the version via the index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-cuda]>=0.9; sys_platform != 'darwin'",
"torch; sys_platform != 'darwin'", # redeclare to make the index below apply
"torchvision; sys_platform != 'darwin'", # redeclare to make the index below apply
]
[[tool.uv.index]]
name = "pytorch-cuda"
url = "https://download.pytorch.org/whl/cu126" # CUDA 12.6, modern default; for older GPUs see below
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-cuda" }
torchvision = { index = "pytorch-cuda" }
Builds for older NVIDIA GPUs (Volta / V100)
The cu126 wheels may not suit older cards.
Find your GPU generation on NVIDIA's current / legacy pages and a matching release on the PyTorch releases page.
Set the index
urlin yourpyproject.tomlto the matching family (see above), then runuv lock.Run RAITAP.
triton-xpu's PyPI releases are either yanked or pre-release. Route it to the Intel index by adding the following to your pyproject.toml:
[project]
dependencies = [
"raitap[BACKEND-intel]>=0.9; sys_platform != 'darwin'",
"torch; sys_platform != 'darwin'", # redeclare to make the index below apply
"torchvision; sys_platform != 'darwin'", # redeclare to make the index below apply
"triton-xpu>=3.0.0rc0; sys_platform != 'darwin' and python_full_version < '3.14'",
]
[[tool.uv.index]]
name = "pytorch-intel"
url = "https://download.pytorch.org/whl/xpu"
explicit = true
[tool.uv.sources]
torch = { index = "pytorch-intel" }
torchvision = { index = "pytorch-intel" }
triton-xpu = { index = "pytorch-intel" }
Wheel availability¶
PyTorch indexes don't publish for every Python minor:
Extra |
Index |
Python |
Platforms |
|---|---|---|---|
|
|
3.11–3.13 |
Linux, macOS, Windows |
|
|
3.11–3.13 |
Linux, Windows |
|
|
3.11–3.13 |
Linux, Windows |
Faster locking on one OS¶
If you only target one OS, scope the resolver so it doesn't solve for all platforms at once:
[tool.uv]
environments = ["sys_platform == 'linux' and python_version >= '3.12'"]
2. Pick assessment extras¶
You can either:
Install a whole module (every library it offers):
uv add "raitap[transparency]"
pip install "raitap[transparency]"
Install a single library / report format. The extra is the library name (
captum,mlflow) or the format (html,pdf). You can combine it all in one line:uv add "raitap[onnx-cpu,transparency,metrics]"
pip install "raitap[onnx-cpu,transparency,metrics]"
3. Run the config with automatic deps management off¶
Pass --custom-deps;
install everything the config needs first.
uv run raitap --config-dir my-configs --config-name assessment --custom-deps
raitap --config-dir my-configs --config-name assessment --custom-deps