From 3b6f65c9a23f07059de33e71ffbe5316de16b9b4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 7 Apr 2024 06:42:53 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- deepmd/pt/model/atomic_model/linear_atomic_model.py | 6 +++++- deepmd/pt/model/model/make_model.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deepmd/pt/model/atomic_model/linear_atomic_model.py b/deepmd/pt/model/atomic_model/linear_atomic_model.py index 6cede6a265..e6faabf5c5 100644 --- a/deepmd/pt/model/atomic_model/linear_atomic_model.py +++ b/deepmd/pt/model/atomic_model/linear_atomic_model.py @@ -201,7 +201,11 @@ def forward_atomic( aparam, ) # apply bias to each individual model - ener_list.append(model.apply_out_stat(raw_ret, mapping[extended_atype][:,:nloc])["energy"]) + ener_list.append( + model.apply_out_stat(raw_ret, mapping[extended_atype][:, :nloc])[ + "energy" + ] + ) weights = self._compute_weight(extended_coord, extended_atype, nlists_) fit_ret = { diff --git a/deepmd/pt/model/model/make_model.py b/deepmd/pt/model/model/make_model.py index ab3f3d0a8f..5a1edb7c1f 100644 --- a/deepmd/pt/model/model/make_model.py +++ b/deepmd/pt/model/model/make_model.py @@ -173,7 +173,7 @@ def forward_common( return model_predict @property - def out_bias(self)-> torch.Tensor: + def out_bias(self) -> torch.Tensor: return self.atomic_model.out_bias def change_out_bias(