Repository navigation
fix(dpa): convert trusted NumPy-scalar training checkpoints to safe inference .pt - #91
Merged
Merged
Conversation
…64 model tensors DATA IMPACT: no scientific record invalidated; outputs are derived artifacts with source hashes.
…g weights into RAM DATA IMPACT: no scientific record invalidated.
…tensor equality DATA IMPACT: no scientific record invalidated.
DATA IMPACT: no scientific record invalidated.
DATA IMPACT: no scientific record invalidated.
DATA IMPACT: no scientific record invalidated.
DATA IMPACT: none; temporary diagnostic step.
DATA IMPACT: no scientific record invalidated.
DATA IMPACT: no scientific record invalidated.
…flow DATA IMPACT: none.
DATA IMPACT: no historical artifact rewritten.
hydrogen1222
marked this pull request as ready for review
November 7, 2026 05:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracking: #61 / #75.
SSE-VASP-dpa2.pt may contain
numpy.float64objects inmodel._extra_state.train_infos.lrand optimizer learning rates, incompatible with DeePMD's explicitweights_only=Trueload. Introducescripts/convert_dpa_checkpoint.pythat requires--i-trust-this-filebefore a single localweights_only=Falseread, preserves all model tensors exactly (including float64), normalizes NumPy scalars, drops optimizer state, writes a separate JSON provenance report with both SHA-256 hashes, and verifiestorch.load(weights_only=True)succeeds and tensors are identical. No global safe-unpickler changes or patched upstream DeePMD code.Add synthetic regression tests and bilingual documentation.
Real SSE checkpoint unavailable to GitHub CI: users must still validate converted-model E/F/stress against their trusted reference; the converter verifies serialization, not physical prediction accuracy.
DATA IMPACT: existing files never modified; any converted model is a new derived artifact linked to its input by hash.