SPSA parameters validation during run submission
Opened this issue · 1 comments
ppigazzini commented
May 15 19:03:33 tests.stockfishchess.org pserve[801]: File "/home/fishtest/fishtest/server/fishtest/views.py", line 1526, in tests_view
May 15 19:03:33 tests.stockfishchess.org pserve[801]: r_iter = p["a"] / (A + iter_local) ** alpha / c_iter**2
May 15 19:03:33 tests.stockfishchess.org pserve[801]: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
May 15 19:03:33 tests.stockfishchess.org pserve[801]: ZeroDivisionError: float division by zero
The SPSA was submitted with c=0
fishtest/server/fishtest/views.py
Lines 1522 to 1539 in 01d6dbc
With a validation of the SPSA parameters in the "Create New Test" page we can avoid this issue:
fishtest/server/fishtest/templates/tests_run.mak
Lines 461 to 469 in 01d6dbc
fishtest/server/fishtest/templates/tests_run.mak
Lines 1028 to 1047 in 01d6dbc
vdbergh commented
As an additional check I will also enforce c<>0 in the schema. I.e. c in ]0,
∞[
. But it will need an upgrade of vtjson since vtsjon does not know about open intervals yet (of course it can be hacked with the current functionality but that would be less elegant).