Skip to content

Commit 8e731c8

Browse files
Copilotnjzjz
andcommitted
fix: address PR feedback - remove test files and move h5py import
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
1 parent 932223d commit 8e731c8

3 files changed

Lines changed: 7 additions & 177 deletions

File tree

deepmd/tf/entrypoints/train.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
Optional,
1414
)
1515

16+
try:
17+
import h5py
18+
except ImportError:
19+
h5py = None
20+
1621
from deepmd.common import (
1722
j_loader,
1823
)
@@ -244,8 +249,8 @@ def _do_work(
244249

245250
if not Path(stat_file_raw).exists():
246251
if stat_file_raw.endswith((".h5", ".hdf5")):
247-
import h5py
248-
252+
if h5py is None:
253+
raise ImportError("h5py is required for HDF5 stat files")
249254
with h5py.File(stat_file_raw, "w") as f:
250255
pass
251256
else:

input_v2_compat.json

Lines changed: 0 additions & 59 deletions
This file was deleted.

out.json

Lines changed: 0 additions & 116 deletions
This file was deleted.

0 commit comments

Comments
 (0)