Skip to content

fix(dpa): convert trusted NumPy-scalar training checkpoints to safe inference .pt - #91

Merged
hydrogen1222 merged 13 commits into
mainfrom
fix/dpa-trusted-checkpoint-converter
Nov 7, 2026
Merged

hydrogen1222 merged 13 commits into
mainfrom
fix/dpa-trusted-checkpoint-converter

Conversation

@hydrogen1222

Copy link
Copy Markdown
Owner

Tracking: #61 / #75.

SSE-VASP-dpa2.pt may contain numpy.float64 objects in model._extra_state.train_infos.lr and optimizer learning rates, incompatible with DeePMD's explicit weights_only=True load. Introduce scripts/convert_dpa_checkpoint.py that requires --i-trust-this-file before a single local weights_only=False read, 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 verifies torch.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.

…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.
DATA IMPACT: no historical artifact rewritten.
…ngelog conflict

Preserve #83 data-integrity documentation and #91 trusted conversion notes with new DPA files.

DATA IMPACT: none.
@hydrogen1222
hydrogen1222 marked this pull request as ready for review November 7, 2026 05:03
Resolve changelog conflict while retaining NEP89 #90, AUD-007 #83, and DPA #91 notes; keep latest main files except the four DPA-specific additions.

DATA IMPACT: no scientific record rewritten.
@hydrogen1222
hydrogen1222 merged commit a8567d9 into main Nov 7, 2026
14 checks passed
@hydrogen1222
hydrogen1222 deleted the fix/dpa-trusted-checkpoint-converter branch November 7, 2026 05:04
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.

1 participant