We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 367e626 commit e7bb15bCopy full SHA for e7bb15b
6 files changed
deepmd/dpmodel/atomic_model/linear_atomic_model.py
@@ -152,7 +152,7 @@ def get_model_sels(self) -> list[int | list[int]]:
152
"""Get the sels for each individual models."""
153
return [model.get_sel() for model in self.models]
154
155
- def _sort_rcuts_sels(self) -> tuple[tuple[Array, Array], list[int]]:
+ def _sort_rcuts_sels(self) -> tuple[list[float], list[int]]:
156
# sort the pair of rcut and sels in ascending order, first based on sel, then on rcut.
157
zipped = sorted(
158
zip(self.get_model_rcuts(), self.get_model_nsels(), strict=True),
deepmd/dpmodel/descriptor/descriptor.py
@@ -9,7 +9,6 @@
9
)
10
from typing import (
11
Any,
12
- NoReturn,
13
14
15
import array_api_compat
@@ -88,7 +87,7 @@ def compute_input_stats(
88
87
self,
89
merged: Callable[[], list[dict]] | list[dict],
90
path: DPPath | None = None,
91
- ) -> NoReturn:
+ ) -> None:
92
"""
93
Compute the input statistics (e.g. mean and stddev) for the descriptors from packed data.
94
@@ -113,7 +112,7 @@ def get_stats(self) -> dict[str, StatItem]:
113
112
114
def share_params(
115
self, base_class: Any, shared_level: Any, resume: bool = False
116
117
118
Share the parameters of self to the base_class with shared_level during multitask training.
119
If not start from checkpoint (resume is False),
@@ -125,9 +124,9 @@ def share_params(
125
124
def call(
126
127
nlist: Array,
128
- extended_coord: Array,
129
- extended_atype: Array,
130
- extended_atype_embd: Array | None = None,
+ coord_ext: Array,
+ atype_ext: Array,
+ atype_embd_ext: Array | None = None,
131
mapping: Array | None = None,
132
type_embedding: Array | None = None,
133
) -> Any:
deepmd/dpmodel/descriptor/dpa1.py
@@ -964,7 +964,7 @@ def call(
964
atype_embd_ext: Array | None = None,
965
966
967
- ) -> tuple[Array, Array]:
+ ) -> tuple[Array, Array, Array, Array, Array]:
968
xp = array_api_compat.array_namespace(nlist, coord_ext, atype_ext)
969
# nf x nloc x nnei x 4
970
dmatrix, diff, sw = self.env_mat.call(
deepmd/dpmodel/descriptor/dpa2.py
@@ -808,7 +808,7 @@ def call(
808
atype_ext: Array,
809
810
811
812
"""Compute the descriptor.
813
814
Parameters
deepmd/dpmodel/descriptor/dpa3.py
@@ -531,7 +531,7 @@ def call(
531
532
533
534
535
536
537
deepmd/dpmodel/descriptor/repflows.py
@@ -484,7 +484,8 @@ def call(
484
485
486
487
+ type_embedding: Array | None = None,
488
489
490
nframes, nloc, nnei = nlist.shape
491
nall = xp.reshape(coord_ext, (nframes, -1)).shape[1] // 3
@@ -858,7 +859,7 @@ def __init__(
858
859
860
e_rcut: float,
861
e_rcut_smth: float,
- e_sel: int,
862
+ e_sel: int | list[int],
863
a_rcut: float,
864
a_rcut_smth: float,
865
a_sel: int,
@@ -1326,7 +1327,7 @@ def call(
1326
1327
a_sw: Array, # switch func, nf x nloc x a_nnei
1328
edge_index: Array, # 2 x n_edge
1329
angle_index: Array, # 3 x n_angle
1330
+ ) -> tuple[Array, Array, Array]:
1331
1332
1333
----------
0 commit comments