Skip to content

Commit b2c8511

Browse files
authored
feat(pretrained): add DPA3-Omol-Large (#5327)
Problem - DPA3-Omol-Large is already published on model hubs but is not exposed through `dp pretrained`. - Users currently cannot download or resolve it via a built-in model alias. Change - add `DPA3-Omol-Large` to the built-in pretrained model registry - include Hugging Face / hf-mirror / ModelScope download URLs and the model sha256 - update the pretrained-model docs and add alias/backend coverage in tests Notes - The SHA256 (`dc4d252b31450b41eb3546cc48f640ad0831c0b5d069ce27d996e0ff58fc037a`) was taken from the Hugging Face LFS object for `DPA3-Omol-Large.pt`. - In this environment I only ran lightweight local validation (`py_compile` + an AST-based registry check). I did not run the full project test suite because the repo test environment was not fully provisioned here. Authored by OpenClaw (model: gpt-5.4) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added "DPA3-Omol-Large" as a new pretrained model, available from multiple download mirrors for improved accessibility and reliability. * **Documentation** * Updated pretrained model examples to include "DPA3-Omol-Large". * **Tests** * Added tests to validate recognition and alias normalization for the new model name. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 1ce26cf commit b2c8511

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

deepmd/pretrained/registry.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@
3333
"filename": "dpa-2.4-7M.pt",
3434
"sha256": "7a5ca2b01579d9617502b4203af839107fdcf1ec7e3ae1d66a5b14811bc5b741",
3535
},
36+
"DPA3-Omol-Large": {
37+
"urls": [
38+
"https://huggingface.co/deepmodelingcommunity/DPA3-Omol-Large/resolve/main/DPA3-Omol-Large.pt?download=true",
39+
"https://hf-mirror.com/deepmodelingcommunity/DPA3-Omol-Large/resolve/main/DPA3-Omol-Large.pt?download=true",
40+
"https://modelscope.cn/models/DeepModelingCommunity/DPA3-Omol-Large/resolve/master/DPA3-Omol-Large.pt",
41+
],
42+
"filename": "DPA3-Omol-Large.pt",
43+
"sha256": "dc4d252b31450b41eb3546cc48f640ad0831c0b5d069ce27d996e0ff58fc037a",
44+
},
3645
}
3746

3847

doc/model/pretrained.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Examples in this release include:
1919

2020
- `DPA-3.2-5M`
2121
- `DPA-3.1-3M`
22+
- `DPA3-Omol-Large`
2223

2324
## Examples
2425

source/tests/common/test_pretrained_backend.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ def test_detect_backend_by_model_name(self) -> None:
2727
backend = Backend.detect_backend_by_model("DPA-3.2-5M")
2828
self.assertIs(backend, PretrainedBackend)
2929

30+
def test_detect_backend_by_new_model_name(self) -> None:
31+
backend = Backend.detect_backend_by_model("DPA3-Omol-Large")
32+
self.assertIs(backend, PretrainedBackend)
33+
3034
def test_detect_backend_by_pretrained_suffix_not_supported(self) -> None:
3135
with self.assertRaises(ValueError):
3236
Backend.detect_backend_by_model("DPA-3.2-5M.pretrained")
@@ -35,6 +39,10 @@ def test_parse_pretrained_alias_plain_name(self) -> None:
3539
self.assertEqual(parse_pretrained_alias("DPA-3.2-5M"), "DPA-3.2-5M")
3640
self.assertEqual(parse_pretrained_alias("dpa-3.2-5m"), "DPA-3.2-5M")
3741

42+
def test_parse_pretrained_alias_new_model_name(self) -> None:
43+
self.assertEqual(parse_pretrained_alias("DPA3-Omol-Large"), "DPA3-Omol-Large")
44+
self.assertEqual(parse_pretrained_alias("dpa3-omol-large"), "DPA3-Omol-Large")
45+
3846
def test_parse_pretrained_alias_invalid(self) -> None:
3947
with self.assertRaises(ValueError):
4048
parse_pretrained_alias("DPA-3.2-5M.pt")

0 commit comments

Comments
 (0)