Skip to content

Commit 7768832

Browse files
authored
fix: fix unit display in dp test (#4980)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Simplified RMSE log messages by removing the " eV/Å" unit suffix for WFC, Polarizability, and Dipole metrics in both per-system and aggregated outputs. * Minor wording and formatting tweaks in test/log output messages; no changes to calculations, reported values, or program behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Jinzhe Zeng <[email protected]>
1 parent 4ef7705 commit 7768832

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

deepmd/entrypoints/test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,8 +1069,8 @@ def test_wfc(
10691069
wfc, numb_test, _ = run_test(dp, test_data, numb_test, data)
10701070
rmse_f = rmse(wfc - test_data["wfc"][:numb_test])
10711071

1072-
log.info("# number of test data : {numb_test:d} ")
1073-
log.info("WFC RMSE : {rmse_f:e} eV/Å")
1072+
log.info(f"# number of test data : {numb_test:d} ")
1073+
log.info(f"WFC RMSE : {rmse_f:e}")
10741074

10751075
if detail_file is not None:
10761076
detail_path = Path(detail_file)
@@ -1097,7 +1097,7 @@ def print_wfc_sys_avg(avg: dict) -> None:
10971097
avg : np.ndarray
10981098
array with summaries
10991099
"""
1100-
log.info(f"WFC RMSE : {avg['rmse']:e} eV/Å")
1100+
log.info(f"WFC RMSE : {avg['rmse']:e}")
11011101

11021102

11031103
def test_polar(
@@ -1239,7 +1239,7 @@ def print_polar_sys_avg(avg: dict) -> None:
12391239
avg : np.ndarray
12401240
array with summaries
12411241
"""
1242-
log.info(f"Polarizability RMSE : {avg['rmse']:e} eV/Å")
1242+
log.info(f"Polarizability RMSE : {avg['rmse']:e}")
12431243

12441244

12451245
def test_dipole(
@@ -1353,4 +1353,4 @@ def print_dipole_sys_avg(avg: dict) -> None:
13531353
avg : np.ndarray
13541354
array with summaries
13551355
"""
1356-
log.info(f"Dipole RMSE : {avg['rmse']:e} eV/Å")
1356+
log.info(f"Dipole RMSE : {avg['rmse']:e}")

0 commit comments

Comments
 (0)