Skip to content

Commit

Permalink
delete property_name in serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
Chengqian-Zhang committed Dec 24, 2024
1 parent 42cfe99 commit b473b6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions deepmd/dpmodel/fitting/property_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def deserialize(cls, data: dict) -> "PropertyFittingNet":
data = data.copy()
check_version_compatibility(data.pop("@version"), 4, 1)
data.pop("dim_out")
data.pop("var_name")
data["property_name"] = data.pop("var_name")
data.pop("tot_ener_zero")
data.pop("layer_name")
data.pop("use_aparam_as_mask", None)
Expand All @@ -130,7 +130,6 @@ def serialize(self) -> dict:
"type": "property",
"task_dim": self.task_dim,
"intensive": self.intensive,
"property_name": self.var_name,
}
dd["@version"] = 4

Expand Down
3 changes: 1 addition & 2 deletions deepmd/pt/model/task/property.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def deserialize(cls, data: dict) -> "PropertyFittingNet":
data = data.copy()
check_version_compatibility(data.pop("@version", 1), 4, 1)
data.pop("dim_out")
data.pop("var_name")
data["property_name"] = data.pop("var_name")
obj = super().deserialize(data)

return obj
Expand All @@ -146,7 +146,6 @@ def serialize(self) -> dict:
"type": "property",
"task_dim": self.task_dim,
"intensive": self.intensive,
"property_name": self.var_name,
}
dd["@version"] = 4

Expand Down

0 comments on commit b473b6a

Please sign in to comment.