deepmodeling / deepmodeling/deepmd-kit
feat(tf2): support or reject TensorFlow-only model features and variants
- Dominant language
- Python
- Stars
- 2k
- Forks
- 649
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 15
Description
## Summary
The common schema exposes TensorFlow/common model features such as `type_embedding`, `modifier`, `compress`, hybrid `pairwise_dprc`, and model variants `frozen`, `pairtab`, and `linear_ener`. TF2 currently rejects or lacks registry entries for these paths.
## Scope
- Inventory each feature and variant against the intended TF2 support contract.
- Implement feasible paths using shared dpmodel composition/serialization semantics.
- Add backend-aware validation for intentionally legacy-TF-only features.
- Validate type maps, component compatibility, serialization metadata, and inference behavior.
- Avoid accepting an option and silently ignoring it.
## Acceptance criteria
- Each listed feature/variant is explicitly supported or rejected for TF2.
- Supported configurations round-trip through serialization and produce deterministic inference.
- Unsupported configurations fail before model construction with an actionable message.
- Hybrid/composite models validate incompatible component combinations.
- Tests and documentation distinguish legacy TensorFlow from TF2.
Refs #5757.
Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh
Contributor guide
Assessment
This issue has not been assessed yet.