Development environment setup¶
Setup steps¶
0. Prerequisites¶
The repository cloned.
Python 3.13 or higher
uv package manager
1. Install dependencies¶
RAITAP supports many machine and model configurations. To avoid conflicts, only install the dependencies that match your setup. Linting and testing of all configurations is done on the CI.
Choose your execution dependency group from the following table:
CPU
CUDA
Intel GPU
Torch
torch-cputorch-cudatorch-intelONNX
onnx-cpuonnx-cudaonnx-intelNote
CUDA corresponds to NVIDIA GPUs.
torch-inteluses the Intel XPU API directly.onnx-inteluses the OpenVINO ONNX Runtime.Apple MPS support is coming soon.
Decide which optional dependencies you need. It can either be a whole module (e.g.
transparency,metrics,tracking) or a specific framework/integration (e.g.shap,captum,mlflow).Consolidate all the dependency groups into a single command and run it. Notice the
--group devflag to install the contributor environment. Here an example:uv sync --group dev --extra onnx-cpu --extra transparency
Warning
Do not run the
synccommands separately. The latest run will override the previous ones.
2. Install the commit message hook¶
uv run pre-commit install --hook-type commit-msg
It will ensure your commit messages follow the conventional commits format.
3. Install the VSCode extensions¶
If you use VSCode, install the recommended extensions (open command palette > search for “Extensions: Show Recommended Extensions”).
If not, install the equivalents for your IDE (see .vscode/extensions.json), and ensure it uses the Python interpreter from the .venv, NOT your global Python installation.
Useful commands¶
uv run pytestruns the test suite. Depending on the dependencies installed, some tests might fail, which is fine. The CI is the real source of truth.uv run ruff check --fix .lints all Python files and applies auto-fixes where possible. Omit the--fixflag to only check for issues without modifying files.uv run ruff format .formats all Python files according to the configured style.uv run pyrightruns type checking on all Python files to catch type errors.uv run cz commitopens an interactive prompt to create a commit message following the conventional commits format. You can also use the VSCode extension instead.uv run docs-previewstarts a local server to preview the documentation, which supports hot-reloading.