From 2b90ebe21945c4c179491172058fea8c6f36df38 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Mon, 2 Oct 2023 00:57:43 -0400 Subject: [PATCH] fix TypeError when type_map is not given Fix #2889. Signed-off-by: Jinzhe Zeng --- deepmd/model/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/model/model.py b/deepmd/model/model.py index 9ae5eacf4f..884a95cc46 100644 --- a/deepmd/model/model.py +++ b/deepmd/model/model.py @@ -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):