Skip to content

Commit

Permalink
fix TypeError when type_map is not given
Browse files Browse the repository at this point in the history
Fix #2889.

Signed-off-by: Jinzhe Zeng <[email protected]>
  • Loading branch information
njzjz committed Oct 2, 2023
1 parent cf61140 commit 2b90ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/model/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ def __init__(
self.descrpt = descriptor
else:
self.descrpt = Descriptor(
**descriptor, ntypes=len(type_map), spin=self.spin
**descriptor, ntypes=len(self.type_map), spin=self.spin
)

if isinstance(fitting_net, Fitting):
Expand Down

0 comments on commit 2b90ebe

Please sign in to comment.