Pytorch
PyTorch¶
This section covers PyTorch configuration for ML and AI projects.
-
Note: Will be installed before others, to avoid using a platform default in the dependencies. Pip should skip ok, unless you specify
x.y.z==flavor, which errors out. -
Warn: Version 2.7.0+ with cu128 is required for RTX 5000+ series! [1]
PYAKET_TORCH_VERSION¶
📦 Type: Version string • Default: None
An optional version of PyTorch to be installed at runtime.
PYAKET_TORCH_BACKEND¶
📦 Type: String • Default: auto
The hardware acceleration backend of PyTorch to be installed at runtime.
- When set to auto, uv will decide the best one (experimental)
- Other values will be passed to the
--extra-index-urlas:
uv pip install torch==${VERSION}$+${BACKEND}
--extra-index-url https://download.pytorch.org/whl/${BACKEND}
The allowed values depends on the PyTorch version. You can check this page for the latest values, and this other page for older ones. ROCm is for AMD GPUs. Use empty for default.