Add an STC and LTC button on test creation

This commit is contained in:
AndyGrant committed 2018-07-10 15:51:59 -04:00
1 parent 0d4b3d0b30
commit b1197bc2f0
4 files changed
+124 -78

No files matched your search

+15 -5
View File
@@ -11,12 +11,22 @@ FRAMEWORK_DEFAULTS = {
'source' : 'http://github.com/AndyGrant/EtherealDev/',
'homepage' : 'http://github.com/AndyGrant/Ethereal',
# Default engine test options
# Default to uci since everyone uses it
'protocol' : 'uci',
'threads' : 1,
'hash' : 8,
'threads' : 1,
'timecontrol' : '10.0+0.1',
# Defaults for Short Time Control tests (default on newTest)
'stc' : {
'threads' : 1,
'hash' : 8,
'timecontrol' : '10.0+0.1',
},
# Defaults for Long Time Control tests (ease of submitting LTC)
'ltc' : {
'threads' : 1,
'hash' : 64,
'timecontrol' : '60.0+0.6',
},
# SPRT bounds and confidence values
'elolower' : 0.0,
+18
View File
@@ -44,6 +44,24 @@ body {
-webkit-box-sizing: border-box;
}
#content button {
padding: 8px 0px;
margin: 2px 0px;
display: inline-block;
vertical-align: middle;
width: 290px;
background-color: #A7D691;
color: black;
border: none;
border-radius: 8px;
cursor: pointer;
font-weight: bold;
}
#content button:hover {
background-color: #6AC63F;
}
#content input[type=submit] {
background-color: #15A049;
color: white;
+4
View File
@@ -6,6 +6,10 @@
<head>
<link rel="stylesheet" href="{% static 'style.css' %}">
<title>OpenBench</title>
<script>
{% block scripts %}
{% endblock %}
</script>
</head>
<body>
{% if error %}
+87 -73
View File
@@ -1,80 +1,94 @@
{% 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}}"
}
{% endblock %}
{% block content %}
<form method="POST" action="/newTest/">
{% csrf_token %}
<div>
<label> Engine Name </label>
<select name="enginename">
{% for name, data in config.engines.items %}
{% if data.default %}
<option selected value="{{name}}">{{data.name}}</option>
{% else %}
<option value="{{name}}">{{data.name}}</option>
{% endif %}
{% endfor %}
</select>
<br>
<label> Dev Branch </label>
<input name="devbranch" autofocus>
</br>
<label> Dev Bench </label>
<input name="devbench">
</br>
<label> Dev Options </label>
<input value="Threads={{config.threads}} Hash={{config.hash}}" name="devoptions">
</br>
<label> Dev Protocol </label>
<input value="{{config.protocol}}" name="devprotocol">
</br>
<label> Base Branch </label>
<input value="master" name="basebranch">
</br>
<label> Base Bench </label>
<input name="basebench">
</br>
<label> Base Options </label>
<input value="Threads={{config.threads}} Hash={{config.hash}}" name="baseoptions">
</br>
<label> Base Protocol </label>
<input value="{{config.protocol}}" name="baseprotocol">
</br>
<label> Source </label>
<input value="{{profile.repo}}" name="source">
</br>
<label> Opening Book </label>
<select name="bookname">
{% for name, data in config.books.items %}
{% if data.default %}
<option selected value="{{name}}">{{data.name}}</option>
{% else %}
<option value="{{name}}">{{data.name}}</option>
{% endif %}
{% endfor %}
</select>
</br>
<label> Time Control </label>
<input value="{{config.timecontrol}}" name="timecontrol">
</br>
<label> Priority </label>
<input value="0" name="priority">
</br>
<label> Throughput </label>
<input value="1000" name="throughput">
</br>
<label> Lower Bound </label>
<input value="{{config.elolower}}" name="elolower">
</br>
<label> Upper Bound </label>
<input value="{{config.eloupper}}" name="eloupper">
</br>
<label> Alpha </label>
<input value="{{config.alpha}}" name="alpha">
</br>
<label> Beta </label>
<input value="{{config.beta}}" name="beta">
</br>
<input type="submit" name="submit" value="Create Engine Test">
</div>
<label> Engine Name </label>
<select name="enginename">
{% for name, data in config.engines.items %}
{% if data.default %}
<option selected value="{{name}}">{{data.name}}</option>
{% else %}
<option value="{{name}}">{{data.name}}</option>
{% endif %}
{% endfor %}
</select>
<br>
<label> Dev Branch </label>
<input name="devbranch" autofocus>
</br>
<label> Dev Bench </label>
<input name="devbench">
</br>
<label> Dev Options </label>
<input id="devoptions" value="Threads={{config.stc.threads}} Hash={{config.stc.hash}}" name="devoptions">
</br>
<label> Dev Protocol </label>
<input value="{{config.protocol}}" name="devprotocol">
</br>
<label> Base Branch </label>
<input value="master" name="basebranch">
</br>
<label> Base Bench </label>
<input name="basebench">
</br>
<label> Base Options </label>
<input id="baseoptions" value="Threads={{config.stc.threads}} Hash={{config.stc.hash}}" name="baseoptions">
</br>
<label> Base Protocol </label>
<input value="{{config.protocol}}" name="baseprotocol">
</br>
<label> Source </label>
<input value="{{profile.repo}}" name="source">
</br>
<label> Opening Book </label>
<select name="bookname">
{% for name, data in config.books.items %}
{% if data.default %}
<option selected value="{{name}}">{{data.name}}</option>
{% else %}
<option value="{{name}}">{{data.name}}</option>
{% endif %}
{% endfor %}
</select>
</br>
<label> Time Control </label>
<input id="timecontrol" value="{{config.stc.timecontrol}}" name="timecontrol">
</br>
<label> Priority </label>
<input value="0" name="priority">
</br>
<label> Throughput </label>
<input value="1000" name="throughput">
</br>
<label> Lower Bound </label>
<input value="{{config.elolower}}" name="elolower">
</br>
<label> Upper Bound </label>
<input value="{{config.eloupper}}" name="eloupper">
</br>
<label> Alpha </label>
<input value="{{config.alpha}}" name="alpha">
</br>
<label> Beta </label>
<input value="{{config.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>
{% endblock %}