This issue was found by a Codex global code scan of the repository.
Affected code:
|
def loss_ener() -> list[Argument]: |
|
doc_start_pref_e = start_pref("energy") |
|
doc_limit_pref_e = limit_pref("energy") |
|
doc_start_pref_f = start_pref("force") |
|
doc_limit_pref_f = limit_pref("force") |
|
doc_start_pref_v = start_pref("virial") |
|
doc_limit_pref_v = limit_pref("virial") |
|
doc_start_pref_ae = start_pref("atom_ener") |
|
doc_start_pref_ae = limit_pref("atom_ener") |
|
Argument( |
|
"start_pref_ae", |
|
[float, int], |
|
optional=True, |
|
default=0.00, |
|
doc=doc_start_pref_v, |
|
), |
|
Argument( |
|
"limit_pref_ae", |
|
[float, int], |
|
optional=True, |
|
default=0.00, |
|
doc=doc_limit_pref_v, |
Problem:
The DeePMD-style fixture computes doc_start_pref_ae = start_pref("atom_ener"), then immediately overwrites the same variable with limit_pref("atom_ener"). Later, the start_pref_ae and limit_pref_ae arguments use the virial docs (doc_start_pref_v and doc_limit_pref_v) instead of the atomic-energy docs.
Observed behavior:
Generated fixture documentation describes atomic-energy loss prefactors as virial loss prefactors.
Expected behavior:
doc_limit_pref_ae should be assigned separately, and start_pref_ae / limit_pref_ae should use the atomic-energy doc variables.
This issue was found by a Codex global code scan of the repository.
Affected code:
dargs/tests/dpmdargs.py
Lines 520 to 528 in b4db564
dargs/tests/dpmdargs.py
Lines 573 to 585 in b4db564
Problem:
The DeePMD-style fixture computes
doc_start_pref_ae = start_pref("atom_ener"), then immediately overwrites the same variable withlimit_pref("atom_ener"). Later, thestart_pref_aeandlimit_pref_aearguments use the virial docs (doc_start_pref_vanddoc_limit_pref_v) instead of the atomic-energy docs.Observed behavior:
Generated fixture documentation describes atomic-energy loss prefactors as virial loss prefactors.
Expected behavior:
doc_limit_pref_aeshould be assigned separately, andstart_pref_ae/limit_pref_aeshould use the atomic-energy doc variables.