Exscientia / physicsml

A package for all physics based/related models
MIT License
40 stars 1 forks source link

Feature request: exponential moving average #30

Closed erwallace closed 1 month ago

erwallace commented 2 months ago

Hello,

Is it possible to add the option of using exponential moving average when updating weights during training? This is a feature in the MACE code and seems to be commonly used for NequIP and MACE. When training MACE models I have found its not uncommon for the errors in both training and validation to jump and take a long time to recover. I believe EMA would help fix this.

Thanks Ewan

wardhaddadin1 commented 2 months ago

Hey! Thanks for reaching out.

Yeah this is possible with Lightning Callbacks. NVIDIA has implemented the EMA callback here. To use this in physicsml, all you need to do is

We can make this part of the physicsml package by default, but we need to look at the licensing.

Hope this helps, let me know if you have any more questions!

Best, Ward