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

LLPR improvements #307

Merged
merged 51 commits into from
Oct 25, 2024
Merged

LLPR improvements #307

merged 51 commits into from
Oct 25, 2024

Conversation

frostedoyster
Copy link
Collaborator

@frostedoyster frostedoyster commented Jul 19, 2024

Implements a set of improvements to the LLPR:

  • Zero-cost algorithm to include forces and stresses in the covariance matrix
  • Force uncertainty example
  • Dtype handling
  • Torchscript test

📚 Documentation preview 📚: https://metatrain--307.org.readthedocs.build/en/307/

Copy link
Contributor

@SanggyuChong SanggyuChong left a comment

Choose a reason for hiding this comment

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

Please see comments about how the parameters are supposed to be interpreted, defined, extracted, and used.


llpr_model = LLPRUncertaintyModel(model)

print("Last layer parameters:")
Copy link
Contributor

Choose a reason for hiding this comment

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

see later comment

"""
self.model = self.model.train() # we need gradients w.r.t. parameters
# disable gradients for all parameters that are not in the list
for parameter in self.model.parameters():
Copy link
Contributor

Choose a reason for hiding this comment

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

The logic behind the introduction of parameters is very unclear. What are the parameters? How does the relate to the last-layer features? How are these parameters to be defined, and then extracted for the covariance matrix to be correctly calculated? This needs to be documented.

Copy link
Contributor

@SanggyuChong SanggyuChong left a comment

Choose a reason for hiding this comment

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

To me it looks good, didn't understand the shift from computing something on the energies and forces to working directly on the loss functions, but now i understand and see it now.

Thanks for the revamp, filippo, looking forward to playing with this!

@frostedoyster frostedoyster merged commit 2f8057a into main Oct 25, 2024
12 checks passed
@frostedoyster frostedoyster deleted the llpr branch October 25, 2024 06:48
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.

3 participants