You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Closesdeepmodeling#5665.
## Summary
- centralize remapping of negative virtual atom types to the reserved
final row of padded embedding tables
- apply the same pair-index convention across dpmodel, pt_expt, legacy
PyTorch, and Paddle DPA1/DPA2/SE_T implementations
- keep real-type-only exclusion and normalization tables on a separate
clamp-to-real convention
- use the shared remapping helper in SeZMTypeEmbedding
- cover DPA1 virtual neighbors inside the cutoff, DPA2, both DPA3
local-mapping branches, pt_expt pair arithmetic, and legacy PyTorch
descriptors
## Sentinel convention
Only tables explicitly constructed with a final padding row may use
ntypes as the remapped virtual type. Real-type-only tables such as davg,
dstd, exclusion inputs, and spin masks must instead receive masked or
clamped real-type indices. TypeEmbedNet reconstructs a literal zero
padding row; SeZMTypeEmbedding reserves and initializes its stored final
row to zero.
## Validation
- focused virtual-type and backend regressions: 15 passed
- DPA1 graph parity plus the existing DPA2 descriptor tests: 18 passed
- pt_expt DPA1 export tests: 8 passed
- changed-file ruff check: passed
- ruff format .: passed
- git diff --check: passed
- Paddle-specific code was statically checked but could not be executed
locally because Paddle is not installed
- full ruff check . still reports five unrelated pre-existing findings
in deepmd/jax/jax_md/__init__.py and deepmd/tf/entrypoints/__init__.py
Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added consistent padding-aware type-embedding handling across dense,
graph, and accelerated descriptor calculations.
- Virtual or negative atom types now map safely to the designated
padding embedding.
- **Bug Fixes**
- Prevented incorrect embedding lookups and invalid type indexing across
supported execution paths.
- Ensured virtual types produce results equivalent to explicit padding
types.
- **Tests**
- Added regression coverage across NumPy, PyTorch, descriptor modes, and
embedding pathways.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: njzjz-bot <njzjz.bot@gmail.com>
Co-authored-by: njzjz-bot <njzjz-bot@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
0 commit comments