Skip to content

Added sample_kind to ModelOutput, without breaking changes#168

Open
pfebrer wants to merge 1 commit intomainfrom
sample_kind
Open

Added sample_kind to ModelOutput, without breaking changes#168
pfebrer wants to merge 1 commit intomainfrom
sample_kind

Conversation

@pfebrer
Copy link
Copy Markdown

@pfebrer pfebrer commented Feb 26, 2026

This PR substitutes #165.

It also implements sample_kind, with the short-term goal of enabling per-pair targets, but in this case in a way that doesn't break backward compatibility (new code using old ModelOutput might fail, but old code using the new ModelOutput won't). This is achieved by keeping the possibility to pass per_atom as an argument, and setting/getting it as a property, even though from now on the only thing ModelOutput stores is sample_kind.

Thanks to @Luthaf for letting me know that one can set optional arguments in torch exportable classes :)

If you agree with merging this one I will finalize it with some more tests ✌️

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

⚙️ Download Python wheels for this pull-request (you can install these with pip)

📚 Download documentation for this pull-request

@pfebrer pfebrer force-pushed the sample_kind branch 3 times, most recently from 4b3c32d to 87dc377 Compare March 13, 2026 21:37
@pfebrer
Copy link
Copy Markdown
Author

pfebrer commented Mar 13, 2026

This is ready for a final look. I checked that one can take the conda lammps-metatomic and use this modified metatomic version without problems to run an MD with a pet-mad.pt exported using the last metatomic release. The results of the MD are exactly the same as when running without the modified version.

@Luthaf
Copy link
Copy Markdown
Member

Luthaf commented Mar 25, 2026

Do not merge before #186, we need to have at least one release of metatomic-ase that works with an already released version of metatomic-torch

@Luthaf Luthaf force-pushed the sample_kind branch 2 times, most recently from eea1821 to 9353d37 Compare April 7, 2026 13:01
…lity

Co-Authored-By: Guillaume Fraux <guillaume.fraux@epfl.ch>
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