Skip to content

Commit e6d0950

Browse files
committed
compatibility with old models
1 parent b78491a commit e6d0950

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

deepmd/pt/infer/deep_eval.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,11 @@ def get_dim_aparam(self) -> int:
220220

221221
def has_default_fparam(self) -> bool:
222222
"""Check if the model has default frame parameters."""
223-
return self.dp.model["Default"].has_default_fparam()
223+
try:
224+
return self.dp.model["Default"].has_default_fparam()
225+
except AttributeError:
226+
# for compatibility with old models
227+
return False
224228

225229
def get_intensive(self) -> bool:
226230
return self.dp.model["Default"].get_intensive()

0 commit comments

Comments
 (0)