Add support for engine specific settings for testing
This commit is contained in:
1 parent
0ca1d4e42d
commit
81e791abec
4 files changed
+117
-119
No files matched your search
+29
-42
@@ -1,74 +1,61 @@
|
||||
|
||||
# Workers will use FRAMEWORK_REPO_URL to determine the location
|
||||
# for the Cutechess binary and DLLs, as well as any of the books
|
||||
# which are being used in the testing framework. The main OpenBench
|
||||
# repo should suffice, but new books require this to be redirected.
|
||||
FRAMEWORK_REPO_URL = 'http://github.com/AndyGrant/OpenBench/'
|
||||
|
||||
FRAMEWORK_DEFAULTS = {
|
||||
|
||||
'config' : {
|
||||
|
||||
# Framework source, must be changed for your instance
|
||||
'framework' : 'http://github.com/AndyGrant/OpenBench/',
|
||||
# Controls the Link on the sidebar
|
||||
'framework' : FRAMEWORK_REPO_URL,
|
||||
|
||||
# Default to uci since everyone uses it
|
||||
'protocol' : 'uci',
|
||||
|
||||
# Defaults for Short Time Control tests
|
||||
'stc' : {
|
||||
'threads' : 1,
|
||||
'hash' : 8,
|
||||
'timecontrol' : '10.0+0.1',
|
||||
# SPRT Elo bounds and type I/II errors
|
||||
'sprt' : {
|
||||
'elolower' : 0.00, 'eloupper' : 5.00,
|
||||
'alpha' : 0.05, 'beta' : 0.05,
|
||||
},
|
||||
|
||||
# Defaults for Long Time Control tests
|
||||
'ltc' : {
|
||||
'threads' : 1,
|
||||
'hash' : 64,
|
||||
'timecontrol' : '60.0+0.6',
|
||||
},
|
||||
|
||||
# Defaults for Short Time Control tests with SMP
|
||||
'smpstc' : {
|
||||
'threads' : 8,
|
||||
'hash' : 64,
|
||||
'timecontrol' : '5.0+0.05',
|
||||
},
|
||||
|
||||
# Defaults for Long Time Control tests with SMP
|
||||
'smpltc' : {
|
||||
'threads' : 8,
|
||||
'hash' : 256,
|
||||
'timecontrol' : '20.0+0.2',
|
||||
},
|
||||
|
||||
# SPRT bounds and confidence values
|
||||
'elolower' : 0.0,
|
||||
'eloupper' : 5.0,
|
||||
'alpha' : 0.05,
|
||||
'beta' : 0.05,
|
||||
|
||||
# Configured engines for the framework. To scale NPS for your engine,
|
||||
# in order to match the time controls used here, do the following.
|
||||
# Average a few bench runs for the latest version of Ethereal. Now
|
||||
# take a few bench runs for the latest version of the new engine.
|
||||
# Scale your NPS to match Ethereal's NPS of 1,500,000
|
||||
# Engine Configuration. All engines must have a name, a source repo,
|
||||
# a set of paramaters for each standard test type, as well as a scaled
|
||||
# NPS value, which is used to normalize speed across all workers.
|
||||
|
||||
'engines' : {
|
||||
'Ethereal' : {
|
||||
'name' : 'Ethereal',
|
||||
'source' : 'https://github.com/AndyGrant/Ethereal',
|
||||
'stc' : { 'threads' : 1, 'hash' : 8, 'timecontrol' : '10.0+0.1' },
|
||||
'ltc' : { 'threads' : 1, 'hash' : 64, 'timecontrol' : '60.0+0.6' },
|
||||
'smpstc' : { 'threads' : 8, 'hash' : 64, 'timecontrol' : '5.0+0.05' },
|
||||
'smpltc' : { 'threads' : 8, 'hash' : 256, 'timecontrol' : '20.0+0.2' },
|
||||
'nps' : 1500000,
|
||||
'proto' : 'uci',
|
||||
'default' : True,
|
||||
},
|
||||
|
||||
'Laser' : {
|
||||
'name' : 'Laser',
|
||||
'source' : 'https://github.com/jeffreyan11/uci-chess-engine',
|
||||
'stc' : { 'threads' : 1, 'hash' : 8, 'timecontrol' : '10.0+0.1' },
|
||||
'ltc' : { 'threads' : 1, 'hash' : 64, 'timecontrol' : '60.0+0.6' },
|
||||
'smpstc' : { 'threads' : 8, 'hash' : 64, 'timecontrol' : '5.0+0.05' },
|
||||
'smpltc' : { 'threads' : 8, 'hash' : 256, 'timecontrol' : '20.0+0.2' },
|
||||
'nps' : 625000,
|
||||
'proto' : 'uci',
|
||||
'default' : False,
|
||||
},
|
||||
|
||||
'Weiss' : {
|
||||
'name' : 'Weiss',
|
||||
'source' : 'https://github.com/TerjeKir/weiss',
|
||||
'stc' : { 'threads' : 1, 'hash' : 32, 'timecontrol' : '10.0+0.1' },
|
||||
'ltc' : { 'threads' : 1, 'hash' : 128, 'timecontrol' : '60.0+0.6' },
|
||||
'smpstc' : { 'threads' : 8, 'hash' : 128, 'timecontrol' : '5.0+0.05' },
|
||||
'smpltc' : { 'threads' : 8, 'hash' : 512, 'timecontrol' : '20.0+0.2' },
|
||||
'nps' : 4000000,
|
||||
'proto' : 'uci',
|
||||
'default' : False,
|
||||
},
|
||||
},
|
||||
|
||||
+13
-11
@@ -4,6 +4,11 @@ body {
|
||||
background: #2A2A2A;
|
||||
}
|
||||
|
||||
a:link, a:visited, a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
float: left;
|
||||
margin: 20px;
|
||||
@@ -14,13 +19,14 @@ body {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#sidebar .header {
|
||||
font-weight: bold;
|
||||
color: #AAAAAA;
|
||||
#sidebar li a {
|
||||
font-size: 18px;
|
||||
color: #A2A2A2;
|
||||
}
|
||||
|
||||
#sidebar li {
|
||||
font-size: 18px;
|
||||
#sidebar .header {
|
||||
font-weight: bold;
|
||||
color: #008888;
|
||||
}
|
||||
|
||||
#content {
|
||||
@@ -36,6 +42,7 @@ body {
|
||||
}
|
||||
|
||||
#content input, #content select {
|
||||
background-color: #BBBBBB;
|
||||
padding: 8px;
|
||||
margin: 2px 0px;
|
||||
display: inline-block;
|
||||
@@ -238,9 +245,4 @@ body {
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
a:link, a:visited, a:hover, a:active {
|
||||
text-decoration: none;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
@@ -41,12 +41,12 @@
|
||||
<li><a href="/users">Users</a></li>
|
||||
<li><a href="/eventLog">Events</a></li>
|
||||
<li><a href="/machines">Machines</a></li>
|
||||
<li><a href="{{config.framework}}">OpenBench</a></li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="header">LINKS</li>
|
||||
<li><a href="{{config.framework}}">OpenBench</a></li>
|
||||
<li class="header">ENGINES</li>
|
||||
{% for engine, data in config.engines.items|dictsort:"0.lower" %}
|
||||
<li><a href="{{data.source}}">{{data.name}}</a></li>
|
||||
<li><a href="{{data.source}}">{{data.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,36 +1,64 @@
|
||||
{% extends "OpenBench/base.html" %}
|
||||
|
||||
{% block scripts %}
|
||||
function setupSTC() {
|
||||
document.getElementById("devoptions").value = "Threads={{config.stc.threads}} Hash={{config.stc.hash}}";
|
||||
document.getElementById("baseoptions").value = "Threads={{config.stc.threads}} Hash={{config.stc.hash}}";
|
||||
document.getElementById("timecontrol").value = "{{config.stc.timecontrol}}"
|
||||
}
|
||||
|
||||
function setupLTC() {
|
||||
document.getElementById("devoptions").value = "Threads={{config.ltc.threads}} Hash={{config.ltc.hash}}";
|
||||
document.getElementById("baseoptions").value = "Threads={{config.ltc.threads}} Hash={{config.ltc.hash}}";
|
||||
document.getElementById("timecontrol").value = "{{config.ltc.timecontrol}}"
|
||||
}
|
||||
var testMode = "stc";
|
||||
|
||||
function setupSMPSTC() {
|
||||
document.getElementById("devoptions").value = "Threads={{config.smpstc.threads}} Hash={{config.smpstc.hash}}";
|
||||
document.getElementById("baseoptions").value = "Threads={{config.smpstc.threads}} Hash={{config.smpstc.hash}}";
|
||||
document.getElementById("timecontrol").value = "{{config.smpstc.timecontrol}}"
|
||||
}
|
||||
var configurations = {
|
||||
{% for name, data in config.engines.items %}
|
||||
'{{name}}' : {
|
||||
'proto' : "{{data.proto}}",
|
||||
'stc' : {
|
||||
"threads" : "{{data.stc.threads}}",
|
||||
"hash" : "{{data.stc.hash}}",
|
||||
"timecontrol" : "{{data.stc.timecontrol}}"
|
||||
},
|
||||
'ltc' : {
|
||||
"threads" : "{{data.ltc.threads}}",
|
||||
"hash" : "{{data.ltc.hash}}",
|
||||
"timecontrol" : "{{data.ltc.timecontrol}}"
|
||||
},
|
||||
'smpstc' : {
|
||||
"threads" : "{{data.smpstc.threads}}",
|
||||
"hash" : "{{data.smpstc.hash}}",
|
||||
"timecontrol" : "{{data.smpstc.timecontrol}}"
|
||||
},
|
||||
'smpltc' : {
|
||||
"threads" : "{{data.smpltc.threads}}",
|
||||
"hash" : "{{data.smpltc.hash}}",
|
||||
"timecontrol" : "{{data.smpltc.timecontrol}}"
|
||||
},
|
||||
},
|
||||
{% endfor %}
|
||||
};
|
||||
|
||||
function setupSMPLTC() {
|
||||
document.getElementById("devoptions").value = "Threads={{config.smpltc.threads}} Hash={{config.smpltc.hash}}";
|
||||
document.getElementById("baseoptions").value = "Threads={{config.smpltc.threads}} Hash={{config.smpltc.hash}}";
|
||||
document.getElementById("timecontrol").value = "{{config.smpltc.timecontrol}}"
|
||||
function configure(mode) {
|
||||
|
||||
// Update global test mode
|
||||
testMode = mode;
|
||||
|
||||
// Find the selected engine
|
||||
var selection = document.getElementById("enginename");
|
||||
var engine = selection.options[selection.selectedIndex].value;
|
||||
|
||||
// Parse out the needed configuration settings
|
||||
var threads = configurations[engine][mode]["threads"];
|
||||
var hash = configurations[engine][mode]["hash"];
|
||||
var timecontrol = configurations[engine][mode]["timecontrol"];
|
||||
var protocol = configurations[engine]["proto"];
|
||||
|
||||
// Adjust all the fields to auto-fill the settings
|
||||
document.getElementById("devoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||
document.getElementById("baseoptions").value = "Threads=" + threads + " Hash=" + hash;
|
||||
document.getElementById("timecontrol").value = timecontrol;
|
||||
document.getElementById("devprotocol").value = protocol;
|
||||
document.getElementById("baseprotocol").value = protocol;
|
||||
}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="/newTest/">
|
||||
{% csrf_token %}
|
||||
<label> Engine Name </label>
|
||||
<select name="enginename">
|
||||
<select id="enginename" name="enginename" onchange="configure(testMode)">
|
||||
{% for name, data in config.engines.items %}
|
||||
{% if data.default %}
|
||||
<option selected value="{{name}}">{{data.name}}</option>
|
||||
@@ -38,35 +66,25 @@
|
||||
<option value="{{name}}">{{data.name}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<br>
|
||||
</select><br>
|
||||
<label> Dev Branch </label>
|
||||
<input name="devbranch" autofocus>
|
||||
</br>
|
||||
<input name="devbranch" autofocus></br>
|
||||
<label> Dev Bench </label>
|
||||
<input name="devbench">
|
||||
</br>
|
||||
<input name="devbench"></br>
|
||||
<label> Dev Options </label>
|
||||
<input id="devoptions" value="Threads={{config.stc.threads}} Hash={{config.stc.hash}}" name="devoptions">
|
||||
</br>
|
||||
<input id="devoptions" name="devoptions"></br>
|
||||
<label> Dev Protocol </label>
|
||||
<input value="{{config.protocol}}" name="devprotocol">
|
||||
</br>
|
||||
<input id="devprotocol" name="devprotocol"></br>
|
||||
<label> Base Branch </label>
|
||||
<input value="master" name="basebranch">
|
||||
</br>
|
||||
<input value="master" name="basebranch"></br>
|
||||
<label> Base Bench </label>
|
||||
<input name="basebench">
|
||||
</br>
|
||||
<input name="basebench"></br>
|
||||
<label> Base Options </label>
|
||||
<input id="baseoptions" value="Threads={{config.stc.threads}} Hash={{config.stc.hash}}" name="baseoptions">
|
||||
</br>
|
||||
<input id="baseoptions" name="baseoptions"></br>
|
||||
<label> Base Protocol </label>
|
||||
<input value="{{config.protocol}}" name="baseprotocol">
|
||||
</br>
|
||||
<input id="baseprotocol" name="baseprotocol"></br>
|
||||
<label> Source </label>
|
||||
<input value="{{profile.repo}}" name="source">
|
||||
</br>
|
||||
<input value="{{profile.repo}}" name="source"></br>
|
||||
<label> Opening Book </label>
|
||||
<select name="bookname">
|
||||
{% for name, data in config.books.items %}
|
||||
@@ -76,34 +94,25 @@
|
||||
<option value="{{name}}">{{data.name}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</br>
|
||||
</select></br>
|
||||
<label> Time Control </label>
|
||||
<input id="timecontrol" value="{{config.stc.timecontrol}}" name="timecontrol">
|
||||
</br>
|
||||
<input id="timecontrol" name="timecontrol"></br>
|
||||
<label> Priority </label>
|
||||
<input value="0" name="priority">
|
||||
</br>
|
||||
<input value="0" name="priority"></br>
|
||||
<label> Throughput </label>
|
||||
<input value="1000" name="throughput">
|
||||
</br>
|
||||
<input value="1000" name="throughput"></br>
|
||||
<label> Lower Bound </label>
|
||||
<input value="{{config.elolower}}" name="elolower">
|
||||
</br>
|
||||
<input value="{{config.sprt.elolower}}" name="elolower"></br>
|
||||
<label> Upper Bound </label>
|
||||
<input value="{{config.eloupper}}" name="eloupper">
|
||||
</br>
|
||||
<input value="{{config.sprt.eloupper}}" name="eloupper"></br>
|
||||
<label> Alpha </label>
|
||||
<input value="{{config.alpha}}" name="alpha">
|
||||
</br>
|
||||
<input value="{{config.sprt.alpha}}" name="alpha"></br>
|
||||
<label> Beta </label>
|
||||
<input value="{{config.beta}}" name="beta">
|
||||
</br>
|
||||
<input value="{{config.sprt.beta}}" name="beta"></br>
|
||||
<input type="submit" name="submit" value="Create Engine Test">
|
||||
</form>
|
||||
<button onClick="setupSTC()">Setup STC</button>
|
||||
<button onClick="setupLTC()">Setup LTC</button>
|
||||
<br>
|
||||
<button onClick="setupSMPSTC()">Setup SMP STC</button>
|
||||
<button onClick="setupSMPLTC()">Setup SMP LTC</button>
|
||||
<button onClick="configure('stc')">Setup STC</button>
|
||||
<button onClick="configure('ltc')">Setup LTC</button><br>
|
||||
<button onClick="configure('smpstc')">Setup SMP STC</button>
|
||||
<button onClick="configure('smpltc')">Setup SMP LTC</button>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user