You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds warnings to the documentation that Python 3.14 is not yet
supported and updates install instructions to pin Python (e.g., --python
3.13) when using uv so users don’t accidentally end up on 3.14. It also
updates the CI workflows to run on Python 3.13. In this PR, we also
remove the deprecated flags `--extra-index-url` and `--index-url` for
`uv`-based installations and update to `--index` flag in the
installation docs.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,20 @@ Thank you for your interest in contributing to sleap-nn! This guide will help yo
4
4
5
5
## Development Setup
6
6
7
+
> **Python 3.14 is not yet supported**
8
+
>
9
+
> `sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**.
10
+
> **Python 3.14 is not yet tested or supported.**
11
+
> By default, `uv` will use your system-installed Python.
12
+
> If you have Python 3.14 installed, you must specify the Python version (≤3.13) in the install command.
13
+
>
14
+
> For example:
15
+
>
16
+
> ```bash
17
+
> uv sync --python 3.13 ...
18
+
>```
19
+
> Replace `...` with the rest of your install command as needed.
20
+
7
21
1. **Install [`uv`](https://github.com/astral-sh/uv) and development dependencies**
8
22
`uv` is a fast and modern package manager for`pyproject.toml`-based projects. Refer [installation docs](https://docs.astral.sh/uv/getting-started/installation/) to install uv.
3.**Install sleap-nn dependencies based on your platform**\
40
40
41
+
> **Python 3.14 is not yet supported**
42
+
>
43
+
> `sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**.
44
+
> **Python 3.14 is not yet tested or supported.**
45
+
> By default, `uv` will use your system-installed Python.
46
+
> If you have Python 3.14 installed, you must specify the Python version (≤3.13) in the install command.
47
+
>
48
+
> For example:
49
+
>
50
+
> ```bash
51
+
> uv sync --python 3.13 ...
52
+
>```
53
+
> Replace `...` with the rest of your install command as needed.
54
+
41
55
- Sync all dependencies based on your correct wheel using `uv sync`. `uv sync` creates a `.venv` (virtual environment) inside your current working directory. This environment is only active within that directory and can't be directly accessed from outside. To use all installed packages, you must run commands with `uv run` (e.g., `uv run sleap-nn train ...` or `uv run pytest ...`).
Copy file name to clipboardExpand all lines: docs/index.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,14 +43,22 @@ We use `uvx` here which automatically installs sleap-nn from PyPI with all depen
43
43
44
44
> **Quick Start Data:** Download sample training data from [here](https://storage.googleapis.com/sleap-data/datasets/BermanFlies/random_split1/train.pkg.slp) and validation data from [here](https://storage.googleapis.com/sleap-data/datasets/BermanFlies/random_split1/val.pkg.slp) for quick experimentation.
45
45
46
+
!!! warning "Python 3.14 is not yet supported"
47
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify the Python version in the install commands by adding `--python 3.13`.
48
+
For example:
49
+
```bash
50
+
uvx --python 3.13 ...
51
+
```
52
+
Replace `...` with the rest of your install command as needed.
@@ -60,7 +68,7 @@ We use `uvx` here which automatically installs sleap-nn from PyPI with all depen
60
68
61
69
!!! info
62
70
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
63
-
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
71
+
The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
64
72
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
88
-
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
96
+
The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
89
97
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
Copy file name to clipboardExpand all lines: docs/inference.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ SLEAP-NN provides powerful inference capabilities for pose estimation with suppo
10
10
11
11
- If you're using the `uvx` workflow, you do **not** need to install anything. (See [installation using uvx](installation.md#installation-using-uvx) for more details.)
12
12
13
-
- If you are using `uv sync` or `uv pip` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
13
+
- If you are using `uv sync` or `uv add` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
Copy file name to clipboardExpand all lines: docs/installation.md
+72-18Lines changed: 72 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,18 @@
2
2
3
3
**Prerequisites:** Python 3.11+ (required for all installation methods)
4
4
5
+
!!! warning "Python 3.14 is not yet supported"
6
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify the Python version in all `uv` install commands by adding `--python 3.13`.
Replace `...` with the rest of your install command as needed.
12
+
5
13
!!! tip "Choose Your Installation Method"
6
14
- **[Installation as a system-wide tool with uv](#installation-as-a-system-wide-tool-with-uv)**: **(Recommended)** Use `uv tool install` to install sleap-nn globally as a CLI tool
7
15
- **[Installation with uvx](#installation-with-uvx)**: Use `uvx` for one-off commands (no installation needed)
8
-
- **[Installation with uv pip](#installation-with-uv-pip)**: Use `uv pip` to install from pypi in a uv virtual env.
16
+
- **[Installation with uv add](#installation-with-uv-add)**: Use `uv add` to install sleap-nn as a dependency in a uv virtual env.
9
17
- **[Installation with pip](#installation-with-pip)**: Use `pip` to install from pypi in a conda env. (Recommended to use with a conda env)
10
18
- **[Installation from source](#installation-from-source)**: Use `uv sync` to install from source (for developmental purposes)
11
19
@@ -27,18 +35,26 @@
27
35
28
36
### Platform-Specific Installation
29
37
38
+
!!! warning "Python 3.14 is not yet supported"
39
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify the Python version in the install commands by adding `--python 3.13`.
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
51
-
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
67
+
The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
52
68
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
53
69
54
70
### Verify installation
@@ -76,16 +92,24 @@ sleap-nn --help
76
92
77
93
### Platform-Specific Commands
78
94
95
+
!!! warning "Python 3.14 is not yet supported"
96
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.** If you have Python 3.14 installed, you must specify the Python version in the install commands by adding `--python 3.13`.
97
+
For example:
98
+
```bash
99
+
uvx --python 3.13 ...
100
+
```
101
+
Replace `...` with the rest of your install command as needed.
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
99
-
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
123
+
The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
100
124
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
101
125
102
126
!!! tip "How uvx Works"
@@ -110,9 +134,17 @@ sleap-nn --help
110
134
111
135
---
112
136
113
-
## Installation with uv pip
137
+
## Installation with uv add
114
138
115
-
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs sleap-nn using `uv pip`. To use all installed packages, you must run commands with `uv run` (e.g., `uv run sleap-nn train ...` or `uv run pytest ...`).
139
+
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and adds sleap-nn as a dependency using `uv add`. To use all installed packages, you must run commands with `uv run` (e.g., `uv run sleap-nn train ...` or `uv run pytest ...`).
140
+
141
+
!!! warning "Python 3.14 is not yet supported"
142
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.**`uv` will use the system-installed python by default. If you have python 3.14 installed on your system, then specify the Python version (<=3.13) in the venv command.
143
+
For example:
144
+
```bash
145
+
uv venv --python 3.13 ...
146
+
```
147
+
Replace `...` with the rest of your install command as needed.
116
148
117
149
!!! note "Install and set-up uv"
118
150
Step-1: Install [`uv`](https://github.com/astral-sh/uv) - a fast Python package manager:
@@ -132,28 +164,39 @@ This method creates a dedicated project environment using uv's modern Python pro
132
164
133
165
### Platform-Specific Installation
134
166
167
+
!!! tip "How `uv add` works"
168
+
- When you run `uv init`, it creates a `pyproject.toml` file in your working directory to manage your project's dependencies.
169
+
- When you use `uv add sleap-nn[torch]`, it adds `sleap-nn[torch]` as a dependency in your `pyproject.toml` and installs it in your virtual environment.
170
+
- To add other packages, simply run `uv add <package>`. After adding new packages, you should run `uv sync` to update your environment with all dependencies specified in `pyproject.toml`.
171
+
- To install a local package (such as a local clone of sleap-nn) in editable mode, use:
172
+
```bash
173
+
uv add --editable "./sleap-nn[torch]" ...
174
+
```
175
+
This is useful for development, as changes to the code are immediately reflected in your environment.
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
156
-
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
199
+
The `--index` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
157
200
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
158
201
159
202
### Verify Installation
@@ -182,9 +225,12 @@ uv run sleap-nn --help
182
225
183
226
We recommend creating a dedicated environment with [conda](https://docs.conda.io/en/latest/miniconda.html) or [mamba/miniforge](https://github.com/conda-forge/miniforge) before installing `sleap-nn` with pip. This helps avoid dependency conflicts and keeps your Python setup clean. After installing Miniconda or Miniforge, create and activate an environment, then run the pip install commands below inside the activated environment.
184
227
228
+
!!! warning "Python 3.14 is not yet supported"
229
+
SLEAP currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.**
230
+
185
231
To create a conda environment, run:
186
232
```bash
187
-
conda create -n sleap-nn-env python=3.12
233
+
conda create -n sleap-nn-env python=3.13
188
234
conda activate sleap-nn-env
189
235
```
190
236
@@ -255,6 +301,14 @@ cd sleap-nn
255
301
256
302
#### 3. Install Dependencies
257
303
304
+
!!! warning "Python 3.14 is not yet supported"
305
+
`sleap-nn` currently supports **Python 3.11, 3.12, and 3.13**. **Python 3.14 is not yet tested or supported.**`uv` will use the system-installed python by default. If you have python 3.14 installed on your system, then specify the Python version (<=3.13) in the installation command.
306
+
For example:
307
+
```bash
308
+
uv sync --python 3.13 ...
309
+
```
310
+
Replace `...` with the rest of your install command as needed.
0 commit comments