Config for multiple engines => Send NPS on workloads
This commit is contained in:
1 parent
e93b65fd25
commit
4d169220c6
6 files changed
+40
-11
No files matched your search
+1
-1
@@ -339,7 +339,7 @@ def completeWorkload(data):
|
||||
# Compute and report CPU scaling factor
|
||||
avgnps = (devnps + basenps) / 2.0
|
||||
reportNPS(data, avgnps)
|
||||
scalefactor = 2650000 / avgnps
|
||||
scalefactor = int(data['test']['nps']) / avgnps
|
||||
print ('\nFACTOR : {0}'.format(round(1 / scalefactor, 2)))
|
||||
|
||||
# Compute and report cutechess-cli string
|
||||
|
||||
+21
-9
@@ -11,15 +11,6 @@ FRAMEWORK_DEFAULTS = {
|
||||
'source' : 'http://github.com/AndyGrant/EtherealDev/',
|
||||
'homepage' : 'http://github.com/AndyGrant/Ethereal',
|
||||
|
||||
# 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 2,500,000
|
||||
'engines' : {
|
||||
'Ethereal' : {'nps' : 2500000},
|
||||
},
|
||||
|
||||
# Default engine test options
|
||||
'protocol' : 'uci',
|
||||
'threads' : 1,
|
||||
@@ -33,6 +24,27 @@ FRAMEWORK_DEFAULTS = {
|
||||
'alpha' : 0.10,
|
||||
'beta' : 0.10,
|
||||
|
||||
# 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 2,500,000
|
||||
'engines' : {
|
||||
'Ethereal' : {
|
||||
'name' : 'Ethereal',
|
||||
'source' : 'https://github.com/AndyGrant/Ethereal',
|
||||
'nps' : 2500000,
|
||||
'default' : True,
|
||||
},
|
||||
|
||||
'Laser' : {
|
||||
'name' : 'Laser',
|
||||
'source' : 'https://github.com/jeffreyan11/uci-chess-engine',
|
||||
'nps' : 875000,
|
||||
'default' : False,
|
||||
},
|
||||
},
|
||||
|
||||
# Book confgiruation. When addding a book, follow the provided template.
|
||||
# The SHA is defined by hashlib.sha256(book).hexdigest(). OpenBench.py
|
||||
# (Client File) has an example to show you how to find a hash digest
|
||||
|
||||
@@ -56,6 +56,7 @@ class Result(Model):
|
||||
class Test(Model):
|
||||
|
||||
author = CharField(max_length=64)
|
||||
engine = CharField(max_length=64)
|
||||
|
||||
dev = ForeignKey('Engine', PROTECT, related_name='dev')
|
||||
base = ForeignKey('Engine', PROTECT, related_name='base')
|
||||
|
||||
@@ -55,6 +55,7 @@ def newTest(request):
|
||||
|
||||
test = Test() # New Test, saved only after parsing
|
||||
test.author = request.user.username
|
||||
test.engine = request.POST['enginename']
|
||||
|
||||
# Extract Development Fields
|
||||
devname = request.POST['devbranch']
|
||||
@@ -204,6 +205,7 @@ def workloadDictionary(machine, result, test):
|
||||
'result' : { 'id' : result.id, },
|
||||
'test' : {
|
||||
'id' : test.id,
|
||||
'nps' : FRAMEWORK_DEFAULTS['config']['engines'][test.engine]['nps'],
|
||||
'book' : FRAMEWORK_DEFAULTS['config']['books'][test.bookname],
|
||||
'timecontrol' : test.timecontrol,
|
||||
'dev' : {
|
||||
|
||||
@@ -35,7 +35,10 @@
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="header">LINKS</li>
|
||||
<li><a href="{{config.framework}}">OpenBench </a></li>
|
||||
<li><a href="{{config.framework}}">OpenBench</a></li>
|
||||
{% for engine, data in config.engines.items|dictsort:"0.lower" %}
|
||||
<li><a href="{{data.source}}">{{data.name}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
</div>
|
||||
|
||||
@@ -4,6 +4,17 @@
|
||||
<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>
|
||||
|
||||
Reference in new issue
Block a user