From d57b97bd714cdc12340e1b1a713ce62341e2dd8f Mon Sep 17 00:00:00 2001 From: Duo <50307526+iProzd@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:21:19 +0800 Subject: [PATCH] rename --- deepmd/dpmodel/descriptor/dpa3.py | 4 ++-- deepmd/pt/model/descriptor/dpa3.py | 2 +- deepmd/pt/model/descriptor/repflows.py | 8 ++++---- deepmd/utils/argcheck.py | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deepmd/dpmodel/descriptor/dpa3.py b/deepmd/dpmodel/descriptor/dpa3.py index bcb059ebdc..b644226593 100644 --- a/deepmd/dpmodel/descriptor/dpa3.py +++ b/deepmd/dpmodel/descriptor/dpa3.py @@ -19,7 +19,7 @@ def __init__( update_style: str = "res_residual", update_residual: float = 0.1, update_residual_init: str = "const", - skip_static: bool = False, + skip_stat: bool = False, ) -> None: r"""The constructor for the RepFlowArgs class which defines the parameters of the repflow block in DPA3 descriptor. @@ -77,7 +77,7 @@ def __init__( self.update_style = update_style self.update_residual = update_residual self.update_residual_init = update_residual_init - self.skip_static = skip_static + self.skip_stat = skip_stat def __getitem__(self, key): if hasattr(self, key): diff --git a/deepmd/pt/model/descriptor/dpa3.py b/deepmd/pt/model/descriptor/dpa3.py index 9f43af2e7d..be5bdd5a95 100644 --- a/deepmd/pt/model/descriptor/dpa3.py +++ b/deepmd/pt/model/descriptor/dpa3.py @@ -157,7 +157,7 @@ def init_subclass_params(sub_data, sub_class): update_style=self.repflow_args.update_style, update_residual=self.repflow_args.update_residual, update_residual_init=self.repflow_args.update_residual_init, - skip_static=self.repflow_args.skip_static, + skip_stat=self.repflow_args.skip_stat, exclude_types=exclude_types, env_protection=env_protection, precision=precision, diff --git a/deepmd/pt/model/descriptor/repflows.py b/deepmd/pt/model/descriptor/repflows.py index 21f1c38cc4..c2f084eeab 100644 --- a/deepmd/pt/model/descriptor/repflows.py +++ b/deepmd/pt/model/descriptor/repflows.py @@ -95,7 +95,7 @@ def __init__( exclude_types: list[tuple[int, int]] = [], env_protection: float = 0.0, precision: str = "float64", - skip_static: bool = True, + skip_stat: bool = True, seed: Optional[Union[int, list[int]]] = None, ) -> None: r""" @@ -177,7 +177,7 @@ def __init__( self.split_sel = self.sel self.axis_neuron = axis_neuron self.set_davg_zero = set_davg_zero - self.skip_static = skip_static + self.skip_stat = skip_stat self.n_dim = n_dim self.e_dim = e_dim @@ -233,7 +233,7 @@ def __init__( wanted_shape = (self.ntypes, self.nnei, 4) mean = torch.zeros(wanted_shape, dtype=self.prec, device=env.DEVICE) stddev = torch.ones(wanted_shape, dtype=self.prec, device=env.DEVICE) - if self.skip_static: + if self.skip_stat: stddev = stddev * 0.3 self.register_buffer("mean", mean) self.register_buffer("stddev", stddev) @@ -525,7 +525,7 @@ def compute_input_stats( The path to the stat file. """ - if self.skip_static and self.set_davg_zero: + if self.skip_stat and self.set_davg_zero: return env_mat_stat = EnvMatStatSe(self) if path is not None: diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index b55a229707..7d90e87bf1 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -1483,7 +1483,7 @@ def dpa3_repflow_args(): doc=doc_axis_neuron, ), Argument( - "skip_static", + "skip_stat", bool, optional=True, default=False,