Skip to content

Commit

Permalink
fallback to DPModel
Browse files Browse the repository at this point in the history
Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Feb 25, 2024
1 parent 99dbc7b commit 7fbaf71
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions deepmd/pt/model/model/dp_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,5 @@ def __new__(cls, descriptor, fitting, *args, **kwargs):
cls = DipoleModel

Check warning on line 42 in deepmd/pt/model/model/dp_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/model/model/dp_model.py#L42

Added line #L42 was not covered by tests
elif isinstance(fitting, PolarFittingNet):
cls = PolarModel

Check warning on line 44 in deepmd/pt/model/model/dp_model.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pt/model/model/dp_model.py#L44

Added line #L44 was not covered by tests
else:
raise ValueError(f"Unknown fitting type {fitting}")
# else: unknown fitting type, fall back to DPModel
return super().__new__(cls)

0 comments on commit 7fbaf71

Please sign in to comment.