Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed May 12, 2024
1 parent 7936f9d commit ada7f89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deepmd/dpmodel/descriptor/dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,8 @@ def deserialize(cls, data: dict) -> "DescrptDPA2":
g1_shape_tranform = data.pop("g1_shape_tranform")
tebd_transform = data.pop("tebd_transform", None)
add_tebd_to_repinit_out = data["add_tebd_to_repinit_out"]
data["repinit"] = RepinitArgs(**data["repinit_args"])
data["repformer"] = RepformerArgs(**data["repformer_args"])
data["repinit"] = RepinitArgs(**data.pop("repinit_args"))
data["repformer"] = RepformerArgs(**data.pop("repformer_args"))
obj = cls(**data)
obj.type_embedding = TypeEmbedNet.deserialize(type_embedding)
if add_tebd_to_repinit_out:
Expand Down
4 changes: 2 additions & 2 deletions deepmd/pt/model/descriptor/dpa2.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ def deserialize(cls, data: dict) -> "DescrptDPA2":
g1_shape_tranform = data.pop("g1_shape_tranform")
tebd_transform = data.pop("tebd_transform", None)
add_tebd_to_repinit_out = data["add_tebd_to_repinit_out"]
data["repinit"] = RepinitArgs(**data["repinit_args"])
data["repformer"] = RepformerArgs(**data["repformer_args"])
data["repinit"] = RepinitArgs(**data.pop("repinit_args"))
data["repformer"] = RepformerArgs(**data.pop("repformer_args"))
obj = cls(**data)
obj.type_embedding.embedding = TypeEmbedNetConsistent.deserialize(
type_embedding
Expand Down

0 comments on commit ada7f89

Please sign in to comment.