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

Correctly calculate distributed loss average #269

Merged
merged 2 commits into from
Sep 18, 2021

Conversation

gasteigerjo
Copy link
Contributor

We previously first calculated the loss average per DDP replica and then averaged across replicas. This leads to wrong results since not every replica has the same number of atoms or even systems. This PR changes the computation to instead calculate an average over all replicas by aggregating the number of samples.

This seems to give a tiny improvement in MAE (0.5% or so). But training looks very similar to previously.

@abhshkdz abhshkdz merged commit ef98b27 into FAIR-Chem:master Sep 18, 2021
sparticlesteve pushed a commit to sparticlesteve/ocp that referenced this pull request May 23, 2022
Co-authored-by: Abhishek Das <das.abhshk@gmail.com>
levineds pushed a commit that referenced this pull request Jul 11, 2024
Co-authored-by: Abhishek Das <das.abhshk@gmail.com>
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