Critical bug fix when setting test.errors

Somehow in 10 years I've not yet encounted that in python the expression 3 or 3 evaluates to 3, and not True. This allowed for an attempt to save non-boolean values into the test.error field. Which produced seemingly infinite time losses on some tests I was running with some of the first versions of Torch to ever be on OpenBench.

Also, don't report time loss PGNS back. No one cares about them, and flagging the tests is annoying.
This commit is contained in:
andrew committed 2023-08-31 04:16:37 -04:00
1 parent 4116e795d0
commit ddaeed8374
2 files changed
+2 -5

No files matched your search

+2 -2
View File
@@ -821,7 +821,6 @@ def update_test(request, machine):
crashes = int(request.POST['crashes' ])
timelosses = int(request.POST['timelosses'])
illegals = int(request.POST['illegals' ])
has_error = crashes or timelosses or illegals
# Extract Database information
machine_id = int(request.POST['machine_id'])
@@ -851,7 +850,8 @@ def update_test(request, machine):
test.WW += WW
test.games += games # Overall
test.error = test.error or has_error
# Consider only Crashes or Illegal moves as real errors
test.error = bool(test.error or crashes or illegals)
if test.test_mode == 'SPRT':