sleap icon indicating copy to clipboard operation
sleap copied to clipboard

GUI sets `pad_to_stride` to 16 by default

Open gitttt-1234 opened this issue 8 months ago • 0 comments

Bug description

When training a model through the GUI, the preprocessing configuration sets the pad_to_stride parameter to a default value of 16. However, this value should ideally match the max_stride specified in the model configuration to ensure alignment. Currently, pad_to_stride is only updated to max_stride if it is explicitly set to None here

https://github.com/talmolab/sleap/blob/8228cd24fc4d6585e41bb66d7ddef02c1450b640/sleap/nn/training.py#L1021-L1023

Since the GUI always defaults to 16, this override does not occur—even when a different max_stride is required—potentially leading to inconsistencies during training.

Expected behaviour

pad_to_stride should automatically match max_stride from the model config unless explicitly set.

Actual behaviour

The GUI always sets pad_to_stride to 16, leading to mis-alignment with max_stride.

Your personal set up

  • OS:
  • Version(s):
Environment packages
# paste output of `pip freeze` or `conda list` here
Logs
# paste relevant logs here, if any

Screenshots

How to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

gitttt-1234 avatar Apr 09 '25 23:04 gitttt-1234