Skip to content

Commit fe2e651

Browse files
niksirbilochhh
andauthored
Apply suggestions about phrasing from code review
Co-authored-by: Chang Huan Lo <changhuanlo@yahoo.com>
1 parent b62c405 commit fe2e651

1 file changed

Lines changed: 17 additions & 14 deletions

File tree

docs/source/data_analysis/HPC-module-SLEAP.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Use the SLEAP module on the SWC HPC cluster
1+
# Use SLEAP on the SWC HPC cluster
22

33
```{include} ../_static/swc-wiki-warning.md
44
```
@@ -37,7 +37,7 @@ $ ssh hpc-gw2
3737
To learn more about accessing the HPC via SSH, see the [relevant how-to guide](ssh-cluster-target).
3838

3939
### Access to the SLEAP module
40-
Once you are on the HPC gateway node, you can see the available SLEAP modules by running `module avail SLEAP`:
40+
Once you are on the HPC gateway node, you can list the available SLEAP modules:
4141

4242
```{code-block} console
4343
$ module avail SLEAP
@@ -48,11 +48,14 @@ $ module avail SLEAP
4848
D: Default Module
4949
...
5050
```
51-
- `SLEAP/2026-05-08` corresponds to `SLEAP v.1.6.3` ([PyTorch backend](https://docs.sleap.ai/)) — this is the recommended module for all new projects, and what this guide documents.
52-
- Older modules use the legacy TensorFlow backend (e.g. `SLEAP/2025-09-30` is `SLEAP v.1.3.4`). Load these by full name if you need to maintain compatibility with an existing project, and refer to the [legacy SLEAP documentation](https://legacy.sleap.ai/). Modules with dates before `2025-09-30` are no longer recommended (built for an older Ubuntu).
51+
- `SLEAP/2026-05-08` corresponds to [SLEAP v1.6.3](https://docs.sleap.ai/v1.6.3/) (PyTorch backend) — this is the recommended module for all new projects, and what this guide documents.
52+
- Older modules use the [legacy TensorFlow backend](https://legacy.sleap.ai/). Use these only if you need compatibility with an existing project.
53+
- Modules dated before `2025-09-30` were built for an older Ubuntu base and are no longer recommended.
5354

54-
If a module has been successfully loaded, it will be listed among
55-
other loaded modules when you run `module list`:
55+
To load the recommended PyTorch-based version (the default):
56+
57+
58+
To view the modules that are currently loaded:
5659

5760
```{code-block} console
5861
$ module list
@@ -80,10 +83,10 @@ you will need to use the SLEAP GUI for some steps, such as labelling frames.
8083
Thus, you also need to install SLEAP on your local PC/laptop.
8184

8285
We recommend following the official [SLEAP installation guide](https://docs.sleap.ai/latest/installation/).
83-
To minimise the risk of issues due to incompatibilities between versions, ensure the version of your local installation of SLEAP matches the one you plan to load in the cluster.
86+
To avoid compatibility issues, make sure your local SLEAP version matches the module you plan to use on the cluster.
87+
The guide also includes a [version compatibility table](https://docs.sleap.ai/latest/installation/#version-compatibility) showing which versions of `sleap`, `sleap-io`, and `sleap-nn` belong together—use this when installing a specific version or updating pinned packages.
8488

85-
For, example, to match the latest SLEAP module at the time of writing (`SLEAP/2026-05-08`),
86-
you will need to run the following command in your local terminal:
89+
For example, to match the current default module (`SLEAP/2026-05-08`, SLEAP v1.6.3), you can install the corresponding versions locally with:
8790

8891
```{code-block} console
8992
uv tool install --python 3.13 "sleap[nn]==1.6.3" --with "sleap-io==0.7.0" --with "sleap-nn==0.2.0" --torch-backend auto
@@ -165,18 +168,18 @@ and data pipeline settings for each model. You can inspect them with
165168
The precise files will depend on the model configuration you chose in SLEAP.
166169
Here we see two config files, one for the 'centroid' and another for
167170
the 'centered_instance' model. That's because in this example we have chosen
168-
the 'Top-Down' configuration, which consists of two neural networks - the first
171+
the ['Top-Down](https://nn.sleap.ai/latest/reference/models/#top-down)' configuration, which consists of two neural networks - the first
169172
for isolating the animal instances (by finding their centroids) and the second
170173
for predicting all the body parts per instance.
171174

172-
![Top-Down model configuration](https://legacy.sleap.ai/_images/topdown_approach.jpg)
175+
![Top-Down model configuration](https://nn.sleap.ai/latest/assets/images/topdown_approach.jpg)
173176

174177
:::{dropdown} More on 'Top-Down' vs 'Bottom-Up' models
175178
:color: info
176179
:icon: info
177180

178181
Although the 'Top-Down' configuration was designed with multiple animals in mind,
179-
it can also be used for single-animal videos. It makes sense to use it for videos
182+
it can also be used for single-animal videos,
180183
where the animal occupies a relatively small portion of the frame - see
181184
[Model Configuration](https://nn.sleap.ai/latest/reference/models/) for more info.
182185
:::
@@ -440,9 +443,9 @@ sleap track \
440443
-o $SLP_DIR/predictions/labels.v002.predictions.slp
441444
```
442445
The script mirrors the training one, with a few differences:
443-
- `sleap train` is replaced by a single `sleap track` call (split across lines with `\` for readability).
444-
- The time limit `-t` is lower, since inference is typically faster than training (depends on video length and number of models).
445446
- `--cpus-per-task` and `--mem` are higher; tune these to your specific job, ideally after a scaled-down trial run.
447+
- The time limit `-t` is lower, since inference is typically faster than training (depends on video length and number of models).
448+
- `sleap train` is replaced by a single `sleap track` call (split across lines with `\` for readability).
446449

447450
Using a legacy (TensorFlow) module instead? See [Legacy (TensorFlow) modules](legacy-modules) for the equivalent inference commands.
448451

0 commit comments

Comments
 (0)