Skip to content

Conversation

@gitttt-1234
Copy link
Collaborator

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: 14
    • More efficient training with larger batch sizes
    • Better gradient estimates and faster convergence
    • Applies to both train and validation data loaders

TrainerConfig

  • max_epochs: 10100
    • Allows sufficient training time for proper convergence
    • More appropriate default for pose estimation models
  • seed: 0None
    • No default seeding, allowing natural randomization
    • Users can explicitly set seed when reproducibility is needed

DataConfig

  • use_augmentations_train: FalseTrue
    • 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.05.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

gitttt-1234 and others added 2 commits November 20, 2025 18:11
This commit updates several default configuration values to provide
better out-of-box training behavior and align with best practices:

**DataLoaderConfig Changes:**
- batch_size: 1 → 4
  - More efficient training with larger batch sizes
  - Better gradient estimates and faster convergence

**TrainerConfig Changes:**
- max_epochs: 10 → 100
  - Allows more training time for better convergence
- seed: 0 → None
  - No default seeding, allowing natural randomization

**DataConfig Changes:**
- use_augmentations_train: False → True
  - Enables data augmentation by default for better generalization
- Removed conditional logic in data_mapper that auto-set use_augmentations_train
  - Simplifies behavior to always default to True

**ModelConfig Changes:**
- ClassMapConfig sigma: 15.0 → 5.0
  - More precise class map generation for multi-class models
  - Consistent with confmaps sigma defaults

**Documentation Updates:**
- Updated all docstrings to reflect new default values
- Ensures documentation accuracy across all config classes

These changes provide better default training configurations while
maintaining full backward compatibility through explicit config overrides.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Updated test_dataloader_config and test_trainer_config to expect:
- batch_size: 4 (instead of 1)
- max_epochs: 100 (instead of 10)
- seed: None (instead of 0)

All tests now pass with the updated configuration defaults.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Nov 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.83%. Comparing base (ff91433) to head (e3d4a3d).
⚠️ Report is 65 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #375      +/-   ##
==========================================
- Coverage   95.28%   93.83%   -1.46%     
==========================================
  Files          49       49              
  Lines        6765     7180     +415     
==========================================
+ Hits         6446     6737     +291     
- Misses        319      443     +124     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gitttt-1234 gitttt-1234 merged commit c793ccd into main Nov 21, 2025
8 checks passed
@gitttt-1234 gitttt-1234 deleted the divya/fix-default-aug-config branch November 21, 2025 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants