nvidia_configs: add deepmd env hosting the built-in DPA pretrained models - #225
Merged
Conversation
…dels Adds a DeePMD-kit environment file with ten canonical ids mapped to the names deepmd-kit's own pretrained registry knows (DPA-2.4-7M, DPA-3.1-3M, DPA-3.2-5M, DPA-3.3-1M, DPA3-Omol-Large and the five DPA4-OMat24 sizes), plus a dpa:custom hook for user checkpoints. - Weights resolve through deepmd's registry into $XDG_CACHE_HOME with sha256 verification; serving loads the local file with no network. - Multitask ids require head= (VERIFY_KWARGS picks OMat24 for verify). - Device is selected via deepmd's LOCAL_RANK / DEVICE env contract. - charge/spin from atoms.info are translated to the model's fparam or charge_spin input, matching the other OMol-trained envs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
Adds
sample_model_configurations/nvidia_configs/deepmd.py, a DeePMD-kit environment, plustests/sample_configs/test_deepmd_env.py. Several groups we are onboarding (Delta especially) run DeePMD-kit and fine-tune DPA3; this closes the "DeePMD isn't in the catalog" gap.Ten canonical ids, all mapped to names in deepmd-kit's built-in pretrained registry (
deepmd/pretrained/registry.py, the same namesdp pretrained downloadaccepts, each with HF + mirror URLs and a sha256):dpa3-omol-largeDPA3-Omol-Largedpa4-{nano,mini,neo,air,plus}-omat24DPA4-<Size>-OMat24-v20260805dpa-3.3-1m,dpa-3.2-5m,dpa-3.1-3m,dpa-2.4-7mDPA-3.3-1M…head=requireddpa:custom.ptcheckpoint / frozen.pthviaweights=Design
deepmd-kit[torch]>=3.2.0(released 2026-08-19; first release with the DPA4 loaders and the full registry). The[torch]extra pinstorch==2.11.0.*; torch is listed explicitly so it routes through the cu128 index, since PyPI's 2.11 wheels bundle CUDA 13.uv lock --scriptresolves universally (83 packages: torch 2.11.0+cu128, deepmd-kit 3.2.0, e3nn, vesin, nvalchemi-toolkit-ops 0.4.1, mpich).setup()calls deepmd'sresolve_model_path(name, cache_dir=$XDG_CACHE_HOME/deepmd/pretrained/models)and handsDP()the local path. A cache hit only re-hashes the file (read-only), so serve time never writes to the shared install and needs no network.head=(same rule as umatask/ mace-mh-1headfrom remove bad uma checkpoint and make task heads mandatory to specify #219), even though deepmd itself would silently pick theDefaultalias (OMat24) on 3.2-5M / 3.3-1M.HEADSlists valid branches per id;VERIFY_KWARGSselects OMat24 (covers verify's H2O) for the four multitask ids and fordpa:custom.dpa, notdeepmd: the smoke-test weights= leg finds its baseline by id prefix (_family_of), and every shipped id starts withdpa. The first declared id (dpa3-omol-large) is single-task so that leg needs no head.DEVICE=cpuorcuda:{LOCAL_RANK}at first import.setup()setsLOCAL_RANKforcuda:N(correct under an existingCUDA_VISIBLE_DEVICESmask, unlike overwriting it) andDEVICE=cpufor CPU, before importing deepmd. Works because the worker imports no torch beforesetup().fparam=[charge, spin](DPA3-Omol-Large, DPA-3.2-5M) and acharge_spinembedding (DPA-3.3-1M, DPA4-OMol). A thinDPsubclass fills whichever the loaded model uses fromatoms.info["charge"]/["spin"], matching the other OMol-trained envs; explicitfparam/charge_spinkeys win; absent both, the model's trained-in neutral-singlet default applies.Not verified yet
Not built or verified on any cluster. Delta is the natural first target (most of the DeePMD groups are there). Expect the first verify to surface something, per
docs/environments.md.Deliberately left out
pt-exptbackend /.pt2export), DPA4-Beta, andDPA-3.1-3M-FT(the Matbench-Discovery.pth): on HF but not in deepmd's registry, so they would need a second fetch path.amd_configs/aurora_configscounterpart (ROCm/XPU untested).Tests
uv run pytest tests/sample_configs— 152 passed (13 new: registry resolution into the shared cache, mandatory head, device env contract, custom-path loading, charge/spin translation for both mechanisms, VERIFY_KWARGS ↔ HEADS consistency).🤖 Generated with Claude Code