Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 13, 2024
1 parent 0592107 commit b313b9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,10 @@ def _compute_weight(
) -> List[torch.Tensor]:
"""This should be a list of user defined weights that matches the number of models to be combined."""
nmodels = len(self.models)
return [torch.ones(1, dtype=torch.float64, device=env.DEVICE) / nmodels for _ in range(nmodels)]
return [

Check warning on line 287 in deepmd/pt/model/atomic_model/linear_atomic_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/model/atomic_model/linear_atomic_model.py#L286-L287

Added lines #L286 - L287 were not covered by tests
torch.ones(1, dtype=torch.float64, device=env.DEVICE) / nmodels
for _ in range(nmodels)
]

def get_dim_fparam(self) -> int:
"""Get the number (dimension) of frame parameters of this atomic model."""
Expand Down

0 comments on commit b313b9c

Please sign in to comment.