Skip to content

Commit f270069

Browse files
author
Han Wang
committed
raise error for non-implemented methods
1 parent 9646d71 commit f270069

1 file changed

Lines changed: 4 additions & 18 deletions

File tree

deepmd/backend/pt_expt.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def deep_eval(self) -> type["DeepEvalBackend"]:
7676
type[DeepEvalBackend]
7777
The Deep Eval backend of the backend.
7878
"""
79-
from deepmd.pt.infer.deep_eval import DeepEval as DeepEvalPT
80-
81-
return DeepEvalPT
79+
raise NotImplementedError
8280

8381
@property
8482
def neighbor_stat(self) -> type["NeighborStat"]:
@@ -89,11 +87,7 @@ def neighbor_stat(self) -> type["NeighborStat"]:
8987
type[NeighborStat]
9088
The neighbor statistics of the backend.
9189
"""
92-
from deepmd.pt.utils.neighbor_stat import (
93-
NeighborStat,
94-
)
95-
96-
return NeighborStat
90+
raise NotImplementedError
9791

9892
@property
9993
def serialize_hook(self) -> Callable[[str], dict]:
@@ -104,11 +98,7 @@ def serialize_hook(self) -> Callable[[str], dict]:
10498
Callable[[str], dict]
10599
The serialize hook of the backend.
106100
"""
107-
from deepmd.pt.utils.serialization import (
108-
serialize_from_file,
109-
)
110-
111-
return serialize_from_file
101+
raise NotImplementedError
112102

113103
@property
114104
def deserialize_hook(self) -> Callable[[str, dict], None]:
@@ -119,8 +109,4 @@ def deserialize_hook(self) -> Callable[[str, dict], None]:
119109
Callable[[str, dict], None]
120110
The deserialize hook of the backend.
121111
"""
122-
from deepmd.pt.utils.serialization import (
123-
deserialize_to_file,
124-
)
125-
126-
return deserialize_to_file
112+
raise NotImplementedError

0 commit comments

Comments
 (0)