Skip to content

Exporting models without saving them on disk#89

Merged
abmazitov merged 6 commits intomainfrom
fix-export
Feb 5, 2026
Merged

Exporting models without saving them on disk#89
abmazitov merged 6 commits intomainfrom
fix-export

Conversation

@abmazitov
Copy link
Collaborator

@abmazitov abmazitov commented Feb 4, 2026

As mentioned in #88 , in the current implementation of the UPETCalculator model undergoes torch-scripting by calling the AtomisticModel.save() method, that requires saving a temporary model file on disk. This can be avoided by directly scripting the model in get_upet() function and initialising the calculator with a scripted version.

"ignore: trying to upgrade an old model checkpoint with unknown version, this might fail and require manual modifications"
"ignore: trying to upgrade an old model checkpoint with unknown version, this might fail and require manual modifications",
# TorchScript deprecation warnings
"ignore: `torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`.",
Copy link
Contributor

Choose a reason for hiding this comment

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

This will hide the warnings from CI, but users would still get them. Are you fine with this?

@abmazitov abmazitov merged commit 4f8eb6b into main Feb 5, 2026
5 checks passed
@abmazitov abmazitov deleted the fix-export branch February 5, 2026 15:37
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