diff --git a/deepmd/utils/path.py b/deepmd/utils/path.py index 377953cc35..1f9c4be3ef 100644 --- a/deepmd/utils/path.py +++ b/deepmd/utils/path.py @@ -320,7 +320,7 @@ def _load_h5py(cls, path: str, mode: str = "r") -> h5py.File: # this method has cache to avoid duplicated # loading from different DPH5Path # However the file will be never closed? - return h5py.File(path, mode) + return h5py.File(path, mode, locking=False) def load_numpy(self) -> np.ndarray: """Load NumPy array.