# SPDX-License-Identifier: LGPL-3.0-or-later
from deepmd.utils.batch_size import AutoBatchSize as AutoBatchSizeBase
[docs]
class AutoBatchSize(AutoBatchSizeBase):
"""Automatic batch size for NumPy."""
[docs]
def is_gpu_available(self) -> bool:
"""Check if GPU is available.
Returns
-------
bool
True if GPU is available
"""
return False
[docs]
def is_oom_error(self, e: Exception) -> bool:
"""Check if the exception is an OOM error.
Parameters
----------
e : Exception
Exception
"""
# NumPy never export numpy.core._exceptions.MemoryError
return False