TorchDrug
Use TorchDrug as a modular PyTorch graph-learning stack:
- load a
datasets.*dataset, - choose a
models.*representation model, - wrap it in a
tasks.*objective, - train and evaluate it with
core.Engine.
The current official documentation and latest release are both 0.2.1. Treat newer Python or PyTorch combinations as unverified rather than silently assuming compatibility.
Start with the version guard
Before generating or debugging code, inspect the environment:
python --version
python -c "import torch; print(torch.__version__)"
python -c "import torchdrug; print(torchdrug.__version__)"
The supported matrix for TorchDrug 0.2.1 is:
- Python 3.7 through 3.10
- PyTorch 1.8 through 2.0
- Linux, Windows, or macOS
- Apple Silicon: PyTorch 1.13 or later, CPU only; no MPS support
If the project uses Python 3.11+ or PyTorch 2.1+, create a compatible environment or explicitly test a source build. Do not present such combinations as supported.
Installation
Prefer a dedicated Python 3.10 environment and pin the TorchDrug release:
uv venv --python 3.10
source .venv/bin/activate
uv pip install "torch==2.0.0"
Install `torch-sc…