Skip to content
This repository was archived by the owner on Jul 14, 2026. It is now read-only.

Commit 6c533c5

Browse files
committed
added a few more details about the inference script, for consistency
1 parent 9453050 commit 6c533c5

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,14 @@ SLEAP provides the `sleap track` command line utility for running inference
387387
on a single video or a folder of videos.
388388
See the [remote inference guide](https://docs.sleap.ai/latest/guides/running-sleap-remotely/#remote-inference) for more details.
389389

390-
Below is an example SLURM batch script that contains a `sleap track` call.
390+
Create a new file called `infer-slurm.sh`. Because this script uses absolute paths
391+
(see below), you can keep it anywhere you like.
392+
393+
```{code-block} console
394+
$ nano infer-slurm.sh
395+
```
396+
397+
An example is provided below.
391398
```{code-block} bash
392399
:linenos:
393400
#!/bin/bash
@@ -431,6 +438,11 @@ The script mirrors the training one, with a few differences:
431438
- `--cpus-per-task` and `--mem` are higher; tune these to your specific job, ideally after a scaled-down trial run.
432439
- The time limit `-t` is lower, since inference is typically faster than training (depends on video length and number of models).
433440
- `sleap train` is replaced by a single `sleap track` call (split across lines with `\` for readability).
441+
- Paths are absolute (built from `$SLP_DIR`) rather than relative to the training job folder.
442+
443+
In the `sleap track` call, `-i` is the input video to run inference on (replace this
444+
with the path to your own video), each `-m` points to a trained model from the training
445+
step, and `-o` is the output file where the predictions will be saved.
434446

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

0 commit comments

Comments
 (0)