Commit c793ccd
Update default configuration values for improved training (#375)
## Summary
This PR updates several default configuration values across the codebase
to provide better out-of-box training behavior and align with best
practices for pose estimation training.
## Configuration Changes
### DataLoaderConfig
- **batch_size**: `1` → `4`
- More efficient training with larger batch sizes
- Better gradient estimates and faster convergence
- Applies to both train and validation data loaders
### TrainerConfig
- **max_epochs**: `10` → `100`
- Allows sufficient training time for proper convergence
- More appropriate default for pose estimation models
- **seed**: `0` → `None`
- No default seeding, allowing natural randomization
- Users can explicitly set seed when reproducibility is needed
### DataConfig
- **use_augmentations_train**: `False` → `True`
- Enables data augmentation by default
- Improves model generalization and robustness
- **Removed conditional logic** in `data_mapper`
- Previously auto-set `use_augmentations_train` based on augmentation
args
- Now consistently defaults to `True` for cleaner behavior
### ModelConfig
- **ClassMapConfig sigma**: `15.0` → `5.0`
- More precise class map generation for multi-class models
- Consistent with confmaps sigma defaults
- Better localization accuracy
## Files Changed
- ✅ `sleap_nn/config/data_config.py` - Updated defaults and removed
conditional logic
- ✅ `sleap_nn/config/model_config.py` - Updated ClassMapConfig sigma
- ✅ `sleap_nn/config/trainer_config.py` - Updated batch_size,
max_epochs, seed, and all docstrings
## Benefits
- 🎯 Better default training configurations out-of-box
- 📈 Improved training efficiency with larger batch sizes
- 🔄 Data augmentation enabled by default for better generalization
- ⏱️ Sufficient epochs for proper model convergence
- 📝 Accurate documentation across all config classes
## Backwards Compatibility
These changes only affect default values. All existing configurations
with explicit values will continue to work as before. Users can override
any of these defaults through their config files.
## Testing
- ✅ All configuration classes properly instantiate with new defaults
- ✅ Docstrings accurately reflect current values
- ✅ Linter passes
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <[email protected]>1 parent b3432ef commit c793ccd
File tree
4 files changed
+16
-16
lines changed- sleap_nn/config
- tests/config
4 files changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | 466 | | |
470 | 467 | | |
471 | 468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
| 246 | + | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
214 | | - | |
| 214 | + | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| |||
0 commit comments