Implement net files support for NNUE engines (#75)

This commit is contained in:
Volodymyr Shcherbyna authored and GitHub committed 2020-09-04 00:38:47 -04:00
1 parent 74bf5cbb93
commit d55943d77d
5 files changed
+42 -2

No files matched your search

+10 -1
View File
@@ -203,6 +203,10 @@ def verifyNewTest(request):
if request.POST[field] not in OpenBench.config.OPENBENCH_CONFIG[parent].keys():
errors.append('{0} was not found in the configuration'.format(fieldName))
def verifyGithubLink(field, fieldName):
if request.POST[field] and not request.POST[field].startswith('https://github.com/'):
errors.append('{0} must be located on a Github URL'.format(fieldName))
verifications = [
(verifyInteger, 'priority', 'Priority'),
(verifyInteger, 'throughput', 'Throughput'),
@@ -221,6 +225,8 @@ def verifyNewTest(request):
(verifyOptions, 'baseoptions', 'Hash', 'Base Options'),
(verifyConfiguration, 'enginename', 'Engine', 'engines'),
(verifyConfiguration, 'bookname', 'Book', 'books'),
(verifyGithubLink, 'devnetwork', 'Dev Network'),
(verifyGithubLink, 'basenetwork', 'Base Network'),
]
for verification in verifications:
@@ -245,6 +251,8 @@ def createNewTest(request):
test.source = request.POST['source']
test.devoptions = request.POST['devoptions']
test.baseoptions = request.POST['baseoptions']
test.devnetwork = request.POST['devnetwork']
test.basenetwork = request.POST['basenetwork']
test.bookname = request.POST['bookname']
test.timecontrol = request.POST['timecontrol']
test.priority = int(request.POST['priority'])
@@ -376,12 +384,12 @@ def workloadDictionary(test, result, machine):
'book' : OPENBENCH_CONFIG['books'][test.bookname],
'timecontrol' : test.timecontrol,
'engine' : test.engine,
'dev' : {
'id' : test.dev.id, 'name' : test.dev.name,
'source' : test.dev.source, 'protocol' : test.dev.protocol,
'sha' : test.dev.sha, 'bench' : test.dev.bench,
'options' : test.devoptions,
'network' : test.devnetwork,
},
'base' : {
@@ -389,6 +397,7 @@ def workloadDictionary(test, result, machine):
'source' : test.base.source, 'protocol' : test.base.protocol,
'sha' : test.base.sha, 'bench' : test.base.bench,
'options' : test.baseoptions,
'network' : test.basenetwork,
},
},
}