v0.1.0a4
Pre-releasev0.1.0a4 Release Notes
Summary
This pre-release focuses on bug fixes, performance improvements, and CLI usability enhancements:
- Simpler Train CLI: New
--configflag and positional config support forsleap-nn train - 17-51x Faster Peak Refinement: Replaced kornia-based cropping with fast tensor indexing
- ConvNext/SwinT Bug Fix: Fixed skip connection channel mismatch that broke training with these backbones
- GUI Integration: New
--guiflag for SLEAP frontend progress reporting
For the full list of major features, breaking changes, and improvements introduced in the v0.1.0 series, see the v0.1.0a0 release notes.
What's New in v0.1.0a4
Features
Simplified Train CLI (#429)
Training can now be started with a single config file path:
# NEW: Positional config path
sleap-nn train path/to/config.yaml
# NEW: --config flag
sleap-nn train --config path/to/config.yaml
# With Hydra overrides
sleap-nn train config.yaml trainer_config.max_epochs=100
# Legacy flags still work
sleap-nn train --config-dir /path/to/dir --config-name myconfigThe CLI now uses rich-click for styled help output with better formatting and readability.
GUI Progress Mode (#424)
New --gui flag enables JSON progress output for SLEAP GUI integration:
sleap-nn track --data_path video.mp4 --model_paths model/ --guiOutput format:
{"n_processed": 100, "n_total": 1410, "rate": 38.4, "eta": 34.1}
{"n_processed": 200, "n_total": 1410, "rate": 39.2, "eta": 30.8}This enables real-time progress updates when running inference from the SLEAP GUI.
Performance
17-51x Faster Peak Refinement (#426)
Replaced kornia's crop_and_resize with fast tensor indexing for peak refinement:
| Platform | Before | After | Speedup |
|---|---|---|---|
| MPS (M-series Mac) | 21.45 ms | 0.42 ms | 51x |
| CUDA (RTX A6000) | 2.64 ms | 0.15 ms | 17x |
This also enables integral refinement on Mac - the MPS workaround that disabled it has been removed.
Bug Fixes
ConvNext/SwinT Skip Connection Fix (#428)
Fixed RuntimeError: Given groups=1, weight of size [X, Y, 3, 3], expected input to have Y channels when training with ConvNext or SwinT backbones.
What was broken: Training with ConvNext/SwinT backbones crashed during validation due to channel mismatch in skip connections. The decoder assumed skip channels matched computed decoder filters, but ConvNext/SwinT encoder stages have different channel counts.
Impact: Users can now successfully train models with ConvNext and SwinT backbones. All 24 architecture tests pass.
Crop Device Mismatch Fix (#429)
Fixed RuntimeError: indices should be either on cpu or on the same device as the indexed tensor during top-down inference when bboxes tensor was on GPU but images were on CPU.
CSV Learning Rate Logging Fix (#423)
Fixed regression from v0.1.0a2 where learning_rate column in training_log.csv was always empty.
What was broken: PR #417 changed learning rate logging from lr-Adam to train/lr, but the CSV logger only checked for the old format.
Now: The CSV logger checks for train/lr (new format), lr-* (legacy), and learning_rate (direct) in that order. Also adds model-specific loss columns for better parity with wandb logging.
GUI Progress 99% Fix (#429)
Fixed inference progress ending at 99% instead of 100% in GUI mode. The throttled progress reporting was skipping the final update.
Documentation
Prerelease Docs Alias (#425)
Pre-release documentation is now accessible at both:
- Version-specific:
https://sleap.ai/sleap-nn/v0.1.0a4/ - Alias:
https://sleap.ai/sleap-nn/prerelease/
Internal
Test Suite Optimization (#427)
Optimized the 10 slowest tests for faster CI runs:
| Test | Before | After | Improvement |
|---|---|---|---|
| test_main_cli | 54.44s | 21.76s | 60% |
| test_bottomup_predictor | 6.71s | 1.76s | 74% |
| test_predict_main | 15.97s | 5.35s | 67% |
Total estimated savings: ~55% reduction for slowest tests.
Installation
This is an alpha pre-release. Pre-releases are excluded by default per PEP 440 - you must explicitly opt in.
Install with uv (Recommended)
# With --prerelease flag (requires uv 0.9.20+)
uv tool install sleap-nn[torch] --torch-backend auto --prerelease=allow
# Or pin to exact version
uv tool install "sleap-nn[torch]==0.1.0a4" --torch-backend autoRun with uvx (One-off execution)
uvx --from "sleap-nn[torch]" --prerelease=allow --torch-backend auto sleap-nn systemVerify Installation
sleap-nn --version
# Expected output: 0.1.0a4
sleap-nn system
# Shows full system diagnostics including GPU infoUpgrading from v0.1.0a3
If you already have v0.1.0a3 installed with --prerelease=allow:
# Simple upgrade (retains original settings like --prerelease=allow)
uv tool upgrade sleap-nnTo force a complete reinstall:
uv tool install sleap-nn[torch] --torch-backend auto --prerelease=allow --forceChangelog
| PR | Category | Title |
|---|---|---|
| #423 | Bug Fix | Fix CSV logger not capturing learning_rate |
| #424 | Feature | Add --gui flag for JSON progress output in inference |
| #425 | Documentation | Add prerelease alias to docs deployment |
| #426 | Performance | Replace kornia crop_and_resize with fast tensor indexing |
| #427 | Internal | Optimize slow tests for faster CI runs |
| #428 | Bug Fix | Fix skip connection channel mismatch in ConvNext/SwinT decoders |
| #429 | Feature | Add --config flag for simpler train CLI + fix crop device mismatch |
Full Changelog: v0.1.0a3...v0.1.0a4