Complete overhaul of how engine options are handled

Removed worker_limit and thread_limit
Relocated some settings in the engine configs
Renamed the test_modes and tune_modes to x_presets
Added a default preset grouping, which others can extend
Complete rewrite of create_test.js, with the hope to generalize with create_tune.js
Cleanups of the create_test.html for warnings due to missing html attributes
This commit is contained in:
andrew authored and Andrew Grant committed 2023-11-16 20:25:11 -05:00
1 parent 37cc4a5b96
commit 9123444d22
13 files changed
+185 -249

No files matched your search

+31 -37
View File
@@ -9,12 +9,12 @@
{{ profile.repos|json_script:"json-repos" }}
<script src="{% static 'create_test.js' %}"></script>
<script src="{% static 'default_text.js' %}"></script>
<script>
document.addEventListener(
'DOMContentLoaded', function () {
set_test_type();
set_engine('{{ profile.engine }}', 'dev');
change_engine('{{ profile.engine }}', 'dev');
enforce_default_text('dev_repo', 'https://github.com/');
enforce_default_text('base_repo', 'https://github.com/');
}, false
@@ -33,62 +33,62 @@
<h3> Engines </h3>
<div class="row">
<label> Dev Engine </label>
<select id="dev_engine" name="dev_engine" onchange="set_engine(value, 'dev');">
<label for="dev_engine"> Dev Engine </label>
<select id="dev_engine" name="dev_engine" onchange="change_engine(value, 'dev');">
{% for engine in config.engines %}
<option value="{{ engine }}">{{ engine }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<label> Dev Source </label> <input id="dev_repo" name="dev_repo">
<label for="dev_repo"> Dev Source </label> <input id="dev_repo" name="dev_repo">
</div>
<div class="row">
<label> Base Engine </label>
<select id="base_engine" name="base_engine" onchange="set_engine(value, 'base');">
<label for="base_engine"> Base Engine </label>
<select id="base_engine" name="base_engine" onchange="change_engine(value, 'base');">
{% for engine in config.engines %}
<option value="{{ engine }}">{{ engine }}</option>
{% endfor %}
</select>
</div>
<div class="row">
<label> Base Source </label> <input id="base_repo" name="base_repo">
<label for="base_repo"> Base Source </label> <input id="base_repo" name="base_repo">
</div>
<h3> Dev Settings </h3>
<div class="row">
<label> Dev Branch </label> <input id="dev_branch" name="dev_branch" autofocus>
<label for="dev_branch" > Dev Branch </label> <input id="dev_branch" name="dev_branch" autofocus>
</div>
<div class="row">
<label> Dev Bench </label> <input value="Autofill" name="dev_bench">
<label for="dev_bench" > Dev Bench </label> <input value="Autofill" id="dev_bench" name="dev_bench">
</div>
<div class="row">
<label> Dev Network </label> <select id="dev_network" name="dev_network"></select>
<label for="dev_network" > Dev Network </label> <select id="dev_network" name="dev_network"></select>
</div>
<div class="row">
<label> Dev Options </label> <input id="dev_options" name="dev_options">
<label for="dev_options"> Dev Options </label> <input id="dev_options" name="dev_options">
</div>
<div class="row">
<label> Dev Time </label> <input id="dev_time_control" name="dev_time_control">
<label for="dev_time_control"> Dev Time </label> <input id="dev_time_control" name="dev_time_control">
</div>
<h3> Base Settings </h3>
<div class="row">
<label> Base Branch </label> <input id="base_branch" name="base_branch">
<label for="base_branch"> Base Branch </label> <input id="base_branch" name="base_branch">
</div>
<div class="row">
<label> Base Bench </label> <input value="Autofill" name="base_bench">
<label for="base_bench"> Base Bench </label> <input value="Autofill" id="base_bench" name="base_bench">
</div>
<div class="row">
<label> Base Network </label> <select id="base_network" name="base_network"></select>
<label for="base_network"> Base Network </label> <select id="base_network" name="base_network"></select>
</div>
<div class="row">
<label> Base Options </label> <input id="base_options" name="base_options">
<label for="base_options"> Base Options </label> <input id="base_options" name="base_options">
</div>
<div class="row">
<label> Base Time </label> <input id="base_time_control" name="base_time_control">
<label for="base_time_control" > Base Time </label> <input id="base_time_control" name="base_time_control">
</div>
</div>
@@ -98,7 +98,7 @@
<h3> Test Settings </h3>
<div class="row">
<label> Opening Book </label> <select id="book_name" name="book_name">
<label for="book_name"> Opening Book </label> <select id="book_name" name="book_name">
{% for name, data in config.books.items %}
<option value="{{ name }}">{{ name }}</option>
{% endfor %}
@@ -106,40 +106,34 @@
</div>
<div class="row">
<label> Test Mode </label>
<label for="test_mode"> Test Mode </label>
<select onchange='set_test_type()' id="test_mode" name="test_mode">
<option selected value="SPRT"> SPRT</option>
<option value="GAMES"> Fixed Games</option>
</select>
</div>
<div class="row">
<label> Bounds </label> <input id="test_bounds" name="test_bounds">
<label for="test_bounds"> Bounds </label> <input id="test_bounds" name="test_bounds">
</div>
<div class="row">
<label> Confidence </label> <input id="test_confidence" name="test_confidence">
<label for="test_confidence"> Confidence </label> <input id="test_confidence" name="test_confidence">
</div>
<div class="row">
<label> Max Games </label> <input id="test_max_games" name="test_max_games">
<label for="test_max_games"> Max Games </label> <input id="test_max_games" name="test_max_games">
</div>
<h3> General Settings </h3>
<div class="row">
<label> Priority </label> <input value="0" name="priority">
<label for="priority"> Priority </label> <input value="0" id="priority" name="priority">
</div>
<div class="row">
<label> Throughput </label> <input value="1000" id="throughput" , name="throughput">
<label for="throughput"> Throughput </label> <input value="1000" id="throughput" , name="throughput">
</div>
<div class="row">
<label> Worker Limit</label> <input value="None" id="worker_limit" name="worker_limit">
<label for="workload_size"> Workload Size </label> <input id="workload_size" name="workload_size">
</div>
<div class="row">
<label> Thread Limit </label> <input value="None" id="thread_limit" name="thread_limit">
</div>
<div class="row">
<label> Workload Size </label> <input id="workload_size" name="workload_size">
</div>
<div class="row">
<label> Syzygy WDL </label> <select name="syzygy_wdl">
<label for="syzygy_wdl"> Syzygy WDL </label> <select id="syzygy_wdl" name="syzygy_wdl">
<option selected value="DISABLED"> Disabled </option>
<option value="OPTIONAL"> Optional </option>
<option value="7-MAN"> 7-Man </option>
@@ -152,8 +146,8 @@
<h3> Adjudication Settings </h3>
<div class="row">
<label> Syzygy ADJ. </label>
<select name="syzygy_adj">
<label for="syzygy_adj"> Syzygy ADJ. </label>
<select id="syzygy_adj" name="syzygy_adj">
<option value="DISABLED"> Disabled </option>
<option selected value="OPTIONAL"> Optional </option>
<option value="7-MAN"> 7-Man </option>
@@ -164,10 +158,10 @@
</select>
</div>
<div class="row">
<label> Win ADJ. </label> <input id="win_adj" name="win_adj">
<label for="win_adj"> Win ADJ. </label> <input id="win_adj" name="win_adj">
</div>
<div class="row">
<label> Draw ADJ. </label> <input id="draw_adj" name="draw_adj">
<label for="draw_adj"> Draw ADJ. </label> <input id="draw_adj" name="draw_adj">
</div>
</div>
</div>
-6
View File
@@ -119,12 +119,6 @@
<div class="row">
<label> Throughput </label> <input value="1000" id="throughput" , name="throughput">
</div>
<div class="row">
<label> Worker Limit</label> <input value="None" id="worker_limit" name="worker_limit">
</div>
<div class="row">
<label> Thread Limit </label> <input value="None" id="thread_limit" name="thread_limit">
</div>
<div class="row">
<label> Syzygy WDL </label> <select name="syzygy_wdl">
-6
View File
@@ -118,12 +118,6 @@
<div class="row">
<label>Throughput</label><input value="{{test.throughput}}" name="throughput">
</div>
<div class="row">
<label>Worker Limit</label><input value="{{test.worker_limit|default:'None'}}" name="worker_limit">
</div>
<div class="row">
<label>Thread Limit</label><input value="{{test.thread_limit|default:'None'}}" name="thread_limit">
</div>
<div class="row">
<label>Workload Size</label><input value="{{test.workload_size}}" name="workload_size">
</div>
-8
View File
@@ -125,14 +125,6 @@
<label>Throughput</label>
<input value="{{test.throughput}}" name="throughput">
</div>
<div class="row">
<label>Worker Limit</label>
<input value="{{test.worker_limit|default:'None'}}" name="worker_limit">
</div>
<div class="row">
<label>Thread Limit</label>
<input value="{{test.thread_limit|default:'None'}}" name="thread_limit">
</div>
<!-- Edit Button: For Approvers or Test Authors -->
{% if profile.approver or profile.user.username == test.author %}