Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions deepmd/utils/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
from deepmd_utils.utils.errors import (
OutOfMemoryError,
)


class GraphTooLargeError(Exception):
"""The graph is too large, exceeding protobuf's hard limit of 2GB."""

Expand All @@ -7,5 +12,8 @@ class GraphWithoutTensorError(Exception):
pass


class OutOfMemoryError(Exception):
"""This error is caused by out-of-memory (OOM)."""
__all__ = [
"OutOfMemoryError",
"GraphTooLargeError",
"GraphWithoutTensorError",
]
2 changes: 1 addition & 1 deletion deepmd_utils/utils/batch_size.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import numpy as np

from deepmd.utils.errors import (
from deepmd_utils.utils.errors import (
OutOfMemoryError,
)

Expand Down
3 changes: 3 additions & 0 deletions deepmd_utils/utils/errors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SPDX-License-Identifier: LGPL-3.0-or-later
class OutOfMemoryError(Exception):
"""This error is caused by out-of-memory (OOM)."""