Pass adjudication settings from the server. Allow defaults
This commit is contained in:
1 parent
2f9508f533
commit
aa3e43b125
6 files changed
+121
-43
No files matched your search
+59
-9
@@ -23,7 +23,7 @@ USE_CROSS_APPROVAL = False
|
||||
OPENBENCH_CONFIG = {
|
||||
|
||||
# Server Client version control
|
||||
'client_version' : '4',
|
||||
'client_version' : '5',
|
||||
|
||||
# Generic Error Messages useful to those setting up their own instance
|
||||
'error' : {
|
||||
@@ -106,6 +106,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 3.00]',
|
||||
'source' : 'https://github.com/AndyGrant/Ethereal',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['clang', 'gcc'],
|
||||
@@ -113,14 +116,10 @@ OPENBENCH_CONFIG = {
|
||||
},
|
||||
|
||||
'testmodes' : [
|
||||
{ 'id' : 'STC', 'th' : 1, 'hash' : 8, 'tc' : '10.0+0.1' },
|
||||
{ 'id' : 'LTC', 'th' : 1, 'hash' : 64, 'tc' : '60.0+0.6' },
|
||||
{ 'id' : 'SMP STC', 'th' : 8, 'hash' : 64, 'tc' : '5.0+0.05' },
|
||||
{ 'id' : 'SMP LTC', 'th' : 8, 'hash' : 256, 'tc' : '20.0+0.2' },
|
||||
{ 'id' : 'STC Simplification', 'th' : 1, 'hash' : 8, 'tc' : '10.0+0.1', 'bounds' : '[-3.00, 1.00]' },
|
||||
{ 'id' : 'LTC Simplification', 'th' : 1, 'hash' : 64, 'tc' : '60.0+0.6', 'bounds' : '[-3.00, 1.00]' },
|
||||
{ 'id' : 'STC Regression', 'th' : 1, 'hash' : 8, 'tc' : '10.0+0.1', 'book' : '8moves_v3.epd', 'games' : 40000 },
|
||||
{ 'id' : 'LTC Regression', 'th' : 1, 'hash' : 64, 'tc' : '60.0+0.6', 'book' : '8moves_v3.epd', 'games' : 40000 },
|
||||
{ 'id' : 'STC', 'th' : 1, 'hash' : 8, 'tc' : '10.0+0.1' },
|
||||
{ 'id' : 'LTC', 'th' : 1, 'hash' : 64, 'tc' : '60.0+0.6' },
|
||||
{ 'id' : 'SMP STC', 'th' : 8, 'hash' : 64, 'tc' : '5.0+0.05' },
|
||||
{ 'id' : 'SMP LTC', 'th' : 8, 'hash' : 256, 'tc' : '20.0+0.2' },
|
||||
],
|
||||
},
|
||||
|
||||
@@ -132,6 +131,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/jeffreyan11/uci-chess-engine',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['g++'],
|
||||
@@ -154,6 +156,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[-1.00, 4.00]',
|
||||
'source' : 'https://github.com/TerjeKir/weiss',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['gcc'],
|
||||
@@ -176,6 +181,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/lucasart/Demolito',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['clang', 'gcc'],
|
||||
@@ -198,6 +206,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/Matthies/RubiChess',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['g++'],
|
||||
@@ -220,6 +231,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/fabianvdW/FabChess',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers' : ['cargo>=1.41.0'],
|
||||
@@ -242,6 +256,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 3.00]',
|
||||
'source' : 'https://github.com/vshcherbyna/igel',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['g++'],
|
||||
@@ -264,6 +281,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/rosenthj/Winter',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers' : ['clang++', 'g++'],
|
||||
@@ -286,6 +306,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/KierenP/Halogen',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['g++'],
|
||||
@@ -308,6 +331,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/mhouppin/stash-bot',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['gcc', 'clang'],
|
||||
@@ -330,6 +356,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/connormcmonigle/seer-nnue',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'build',
|
||||
'compilers' : ['g++>=9.0.0'],
|
||||
@@ -352,6 +381,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 2.50]',
|
||||
'source' : 'https://github.com/Luecx/Koivisto',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src_files',
|
||||
'compilers' : ['g++'],
|
||||
@@ -374,6 +406,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/justNo4b/Drofa',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers' : ['g++'],
|
||||
@@ -396,6 +431,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/Aryan1508/Bit-Genie',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['g++'],
|
||||
@@ -418,6 +456,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 3.00]',
|
||||
'source' : 'https://github.com/jhonnold/berserk',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : 'src',
|
||||
'compilers' : ['gcc'],
|
||||
@@ -440,6 +481,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/amanjpro/zahak',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers' : ['go'],
|
||||
@@ -462,6 +506,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/dsekercioglu/blackmarlin',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers': ['cargo>=1.57.0'],
|
||||
@@ -484,6 +531,9 @@ OPENBENCH_CONFIG = {
|
||||
'bounds' : '[0.00, 5.00]',
|
||||
'source' : 'https://github.com/kz04px/4ku',
|
||||
|
||||
'win_adj' : 'movecount=3 score=400',
|
||||
'draw_adj' : 'movenumber=40 movecount=8 score=10',
|
||||
|
||||
'build' : {
|
||||
'path' : '',
|
||||
'compilers' : ['g++'],
|
||||
|
||||
@@ -103,6 +103,9 @@ class Test(Model):
|
||||
syzygy_adj = CharField(max_length=16, default='OPTIONAL')
|
||||
syzygy_wdl = CharField(max_length=16, default='OPTIONAL')
|
||||
|
||||
win_adj = CharField(max_length=64, default='movecount=3 score=400')
|
||||
draw_adj = CharField(max_length=64, default='movenumber=40 movecount=8 score=10')
|
||||
|
||||
# Only for SPRT Tests
|
||||
elolower = FloatField(default=0.0)
|
||||
eloupper = FloatField(default=0.0)
|
||||
|
||||
+26
-11
@@ -203,25 +203,35 @@ def verifyNewTest(request):
|
||||
|
||||
def verifyInteger(field, fieldName):
|
||||
try: int(request.POST[field])
|
||||
except: errors.append('{0} is not an Integer'.format(fieldName))
|
||||
except: errors.append('"{0}" is not an Integer'.format(fieldName))
|
||||
|
||||
def verifyGreaterThan(field, fieldName, value, valueName):
|
||||
if not float(request.POST[field]) > value:
|
||||
errors.append('{0} is not greater than {1}'.format(fieldName, valueName))
|
||||
errors.append('"{0}" is not greater than {1}'.format(fieldName, valueName))
|
||||
|
||||
def verifyOptions(field, option, fieldName):
|
||||
if extractOption(request.POST[field], option) == None:
|
||||
errors.append('{0} was not found as an option for {1}'.format(option, fieldName))
|
||||
errors.append('"{0}" was not found as an option for {1}'.format(option, fieldName))
|
||||
elif int(extractOption(request.POST[field], option)) < 1:
|
||||
errors.append('{0} needs to be at least 1 for {1}'.format(option, fieldName))
|
||||
errors.append('"{0}" needs to be at least 1 for {1}'.format(option, fieldName))
|
||||
|
||||
def verifyConfiguration(field, fieldName, parent):
|
||||
if request.POST[field] not in OpenBench.config.OPENBENCH_CONFIG[parent].keys():
|
||||
errors.append('{0} was not found in the configuration'.format(fieldName))
|
||||
errors.append('"{0}" was not found in the configuration'.format(fieldName))
|
||||
|
||||
def verifyTimeControl(field, fieldName):
|
||||
try: parseTimeControl(request.POST[field])
|
||||
except: errors.append('{0} is not a parsable {1}'.format(request.POST[field], fieldName))
|
||||
except: errors.append('"{0}" is not a parsable {1}'.format(request.POST[field], fieldName))
|
||||
|
||||
def verifyWinAdjudication(field):
|
||||
if (content := request.POST[field]) == 'None': return
|
||||
try: assert re.match('movecount=[0-9]+ score=[0-9]+', content)
|
||||
except: errors.append('"{0}" is not a parsable Win Adjudication Seting'.format(content))
|
||||
|
||||
def verifyDrawAdjudication(field):
|
||||
if (content := request.POST[field]) == 'None': return
|
||||
try: assert re.match('movenumber=[0-9]+ movecount=[0-9]+ score=[0-9]+', content)
|
||||
except: errors.append('"{0}" is not a parsable Draw Adjudication Seting'.format(content))
|
||||
|
||||
verifications = [
|
||||
(verifyInteger, 'priority', 'Priority'),
|
||||
@@ -234,6 +244,8 @@ def verifyNewTest(request):
|
||||
(verifyConfiguration, 'enginename', 'Engine', 'engines'),
|
||||
(verifyConfiguration, 'bookname', 'Book', 'books'),
|
||||
(verifyTimeControl, 'timecontrol', 'Time Control'),
|
||||
(verifyWinAdjudication, 'win_adj'),
|
||||
(verifyDrawAdjudication, 'draw_adj'),
|
||||
]
|
||||
|
||||
for verification in verifications:
|
||||
@@ -244,7 +256,7 @@ def verifyNewTest(request):
|
||||
|
||||
def createNewTest(request):
|
||||
|
||||
errors = []; verifyNewTest(request)
|
||||
errors = verifyNewTest(request)
|
||||
if errors != []: return None, errors
|
||||
|
||||
devinfo = getBranch(request, errors, 'dev')
|
||||
@@ -264,8 +276,10 @@ def createNewTest(request):
|
||||
test.timecontrol = parseTimeControl(request.POST['timecontrol'])
|
||||
test.priority = int(request.POST['priority'])
|
||||
test.throughput = int(request.POST['throughput'])
|
||||
test.syzygy_adj = request.POST['syzygy_adj']
|
||||
test.syzygy_wdl = request.POST['syzygy_wdl']
|
||||
test.syzygy_adj = request.POST['syzygy_adj']
|
||||
test.win_adj = request.POST['win_adj']
|
||||
test.draw_adj = request.POST['draw_adj']
|
||||
|
||||
if request.POST['test_mode'] == 'SPRT':
|
||||
test.elolower = float(request.POST['bounds'].split(',')[0].lstrip('['))
|
||||
@@ -430,14 +444,15 @@ def workload_to_dictionary(test, result, machine):
|
||||
|
||||
'test' : {
|
||||
|
||||
'throughput' : 1000, # HACK: Updated Client's no longer need this value
|
||||
|
||||
'id' : test.id,
|
||||
'engine' : test.engine,
|
||||
'timecontrol' : test.timecontrol,
|
||||
'syzygy_adj' : test.syzygy_adj,
|
||||
'syzygy_wdl' : test.syzygy_wdl,
|
||||
|
||||
'syzygy_adj' : test.syzygy_adj,
|
||||
'win_adj' : test.win_adj,
|
||||
'draw_adj' : test.draw_adj,
|
||||
|
||||
'nps' : OPENBENCH_CONFIG['engines'][test.engine]['nps'],
|
||||
'build' : OPENBENCH_CONFIG['engines'][test.engine]['build'],
|
||||
'book' : OPENBENCH_CONFIG['books'][test.bookname],
|
||||
|
||||
Reference in new issue
Block a user