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 Oct 8, 2024
1 parent 08fcb55 commit 739670e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deepmd/pt/model/atomic_model/linear_atomic_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ def _compute_weight(
for _ in range(nmodels)
]
else:
raise ValueError("`weights` must be 'sum' or 'mean' when provided as a string.")
raise ValueError(

Check warning on line 372 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#L372

Added line #L372 was not covered by tests
"`weights` must be 'sum' or 'mean' when provided as a string."
)
elif isinstance(self.weights, list):
return [

Check warning on line 376 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#L375-L376

Added lines #L375 - L376 were not covered by tests
torch.ones((nframes, nloc, 1), dtype=torch.float64, device=env.DEVICE)
Expand Down

0 comments on commit 739670e

Please sign in to comment.