Skip to content

Commit ca8418b

Browse files
author
Han Wang
committed
fix: pass mae parameter to Paddle eval_pd in consistency tests
The eval_pd methods in TestEner and TestEnerGF were missing the mae parameter, causing key mismatch when comparing Paddle output against the reference (dpmodel) which includes mae_* keys.
1 parent aff5d11 commit ca8418b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/tests/consistent/loss/test_ener.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ def eval_pd(self, pd_obj: Any) -> Any:
297297
label,
298298
self.natoms,
299299
self.learning_rate,
300+
mae=self.mae,
300301
)
301302
loss = to_numpy_array(loss)
302303
more_loss = {kk: to_numpy_array(vv) for kk, vv in more_loss.items()}
@@ -531,6 +532,7 @@ def eval_pd(self, pd_obj: Any) -> Any:
531532
label,
532533
self.natoms,
533534
self.learning_rate,
535+
mae=True,
534536
)
535537
loss = to_numpy_array(loss)
536538
more_loss = {kk: to_numpy_array(vv) for kk, vv in more_loss.items()}

0 commit comments

Comments
 (0)