From 9d4d0e3df58b3fcc4458ae27beec825782fb4739 Mon Sep 17 00:00:00 2001 From: Chengqian-Zhang <2000011006@stu.pku.edu.cn> Date: Tue, 4 Jun 2024 05:22:36 +0000 Subject: [PATCH] Solve alert --- deepmd/pt/model/descriptor/se_atten_v2.py | 2 +- .../consistent/descriptor/test_se_atten_v2.py | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/deepmd/pt/model/descriptor/se_atten_v2.py b/deepmd/pt/model/descriptor/se_atten_v2.py index e64e4f136d..fe22abc346 100644 --- a/deepmd/pt/model/descriptor/se_atten_v2.py +++ b/deepmd/pt/model/descriptor/se_atten_v2.py @@ -231,7 +231,7 @@ def deserialize(cls, data: dict) -> "DescrptDPA1": embeddings = data.pop("embeddings") type_embedding = data.pop("type_embedding") attention_layers = data.pop("attention_layers") - env_mat = data.pop("env_mat") + data.pop("env_mat") embeddings_strip = data.pop("embeddings_strip") obj = cls(**data) diff --git a/source/tests/consistent/descriptor/test_se_atten_v2.py b/source/tests/consistent/descriptor/test_se_atten_v2.py index 6ae3720a3a..54f3cb5826 100644 --- a/source/tests/consistent/descriptor/test_se_atten_v2.py +++ b/source/tests/consistent/descriptor/test_se_atten_v2.py @@ -209,24 +209,6 @@ def setUp(self): dtype=GLOBAL_NP_FLOAT_PRECISION, ) self.natoms = np.array([6, 6, 2, 4], dtype=np.int32) - ( - tebd_dim, - resnet_dt, - type_one_side, - attn, - attn_layer, - attn_dotr, - excluded_types, - env_protection, - set_davg_zero, - scaling_factor, - normalize, - temperature, - ln_eps, - concat_output_tebd, - precision, - use_econf_tebd, - ) = self.param def build_tf(self, obj: Any, suffix: str) -> Tuple[list, dict]: return self.build_tf_descriptor(