Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing exponential moving average Lightning callback #257

Merged
merged 13 commits into from
Jul 19, 2024

Conversation

laserkelvin
Copy link
Collaborator

This PR adds an exponential moving average callback for improved generalization in training dynamics, in a modular fashion.

The callback works entirely independently of a given task: the EMA model updates are performed by this callback's training hooks, rather than by the task itself. That said, base methods in tasks were updated such that inference is done with the EMA model weights if they are available.

An example script is also provided showing how to use both SWA and EMA callbacks in a training run.

@laserkelvin laserkelvin added enhancement New feature or request training Issues related to model training labels Jul 19, 2024
@laserkelvin
Copy link
Collaborator Author

The SAM callback tests are failing - don't think it's due to things I've changed...

Copy link
Collaborator

@melo-gonzo melo-gonzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, this will be nice to try on our supported architectures!

@laserkelvin laserkelvin merged commit 269b85d into IntelLabs:main Jul 19, 2024
3 of 4 checks passed
@laserkelvin laserkelvin deleted the ema-support branch July 19, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request training Issues related to model training
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants