1. Create the interface code to allow for it. 2. Create pgn_util to strip and compress PGNs
258 lines
11 KiB
HTML
258 lines
11 KiB
HTML
{% extends "OpenBench/base.html" %}
|
|
|
|
{% load static %}
|
|
|
|
{% block scripts %}
|
|
|
|
{{ config|json_script:"json-config" }}
|
|
{{ networks|json_script:"json-networks" }}
|
|
{{ profile.repos|json_script:"json-repos" }}
|
|
|
|
<script src="{% static 'create_workload.js' %}"></script>
|
|
<script src="{% static 'default_text.js' %}"></script>
|
|
|
|
<script>
|
|
document.addEventListener(
|
|
'DOMContentLoaded', function () {
|
|
change_engine('{{ profile.engine }}', 'dev', '{{workload}}');
|
|
enforce_default_text('dev_repo', 'https://github.com/');
|
|
enforce_default_text('base_repo', 'https://github.com/');
|
|
}, false
|
|
);
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<form method="POST" action="{{submit_endpoint}}">
|
|
{% csrf_token %}
|
|
|
|
<div class="form w-100">
|
|
<div class="col">
|
|
|
|
<h3> Engines </h3>
|
|
|
|
<div class="row">
|
|
<label for="dev_engine"> {{dev_text}} Engine </label>
|
|
<select id="dev_engine" name="dev_engine" onchange="change_engine(value, 'dev', '{{workload}}');">
|
|
{% for engine in config.engines %}
|
|
<option value="{{ engine }}">{{ engine }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="dev_repo"> {{dev_text}} Source </label> <input id="dev_repo" name="dev_repo">
|
|
</div>
|
|
|
|
{% if workload == "TEST" %}
|
|
<div class="row">
|
|
<label for="base_engine"> Base Engine </label>
|
|
<select id="base_engine" name="base_engine" onchange="change_engine(value, 'base', '{{workload}}');">
|
|
{% for engine in config.engines %}
|
|
<option value="{{ engine }}">{{ engine }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="base_repo"> Base Source </label> <input id="base_repo" name="base_repo">
|
|
</div>
|
|
{% endif %}
|
|
|
|
<h3> {{dev_title_text}} Settings </h3>
|
|
|
|
<div class="row">
|
|
<label for="dev_branch" > {{dev_text}} Branch </label> <input id="dev_branch" name="dev_branch" autofocus>
|
|
</div>
|
|
<div class="row">
|
|
<label for="dev_bench" > {{dev_text}} Bench </label> <input value="Autofill" id="dev_bench" name="dev_bench">
|
|
</div>
|
|
<div class="row">
|
|
<label for="dev_network" > {{dev_text}} Network </label> <select id="dev_network" name="dev_network"></select>
|
|
</div>
|
|
<div class="row">
|
|
<label for="dev_options"> {{dev_text}} Options </label> <input id="dev_options" name="dev_options">
|
|
</div>
|
|
<div class="row">
|
|
<label for="dev_time_control"> {{dev_text}} Time </label> <input id="dev_time_control" name="dev_time_control">
|
|
</div>
|
|
|
|
{% if workload == "TEST" %}
|
|
|
|
<h3> Base Settings </h3>
|
|
|
|
<div class="row">
|
|
<label for="base_branch"> Base Branch </label> <input id="base_branch" name="base_branch">
|
|
</div>
|
|
<div class="row">
|
|
<label for="base_bench"> Base Bench </label> <input value="Autofill" id="base_bench" name="base_bench">
|
|
</div>
|
|
<div class="row">
|
|
<label for="base_network"> Base Network </label> <select id="base_network" name="base_network"></select>
|
|
</div>
|
|
<div class="row">
|
|
<label for="base_options"> Base Options </label> <input id="base_options" name="base_options">
|
|
</div>
|
|
<div class="row">
|
|
<label for="base_time_control" > Base Time </label> <input id="base_time_control" name="base_time_control">
|
|
</div>
|
|
|
|
{% elif workload == "TUNE" %}
|
|
|
|
<h3> SPSA Methodologies </h3>
|
|
|
|
<div class="row">
|
|
<label for="spsa_reporting_type"> Reporting </label>
|
|
<select id="spsa_reporting_type" name="spsa_reporting_type">
|
|
<option selected value="BATCHED"> Batched </option>
|
|
<option value="BULK"> Bulk </option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="spsa_distribution_type"> Distribution </label>
|
|
<select id="spsa_distribution_type" name="spsa_distribution_type">
|
|
<option selected value="SINGLE"> Single </option>
|
|
<option value="MULTIPLE"> Multiple </option>
|
|
</select>
|
|
</div>
|
|
|
|
<h3> SPSA Input </h3>
|
|
|
|
<div class="row">
|
|
<textarea style="margin-left:24px" id="spsa_inputs" name="spsa_inputs" rows=9></textarea>
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<div class="col">
|
|
|
|
{% if workload == "TEST" %}
|
|
|
|
<h3> Test Settings </h3>
|
|
|
|
<div class="row">
|
|
<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 for="test_bounds"> Bounds </label> <input id="test_bounds" name="test_bounds">
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="test_confidence"> Confidence </label> <input id="test_confidence" name="test_confidence">
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="test_max_games"> Max Games </label> <input id="test_max_games" name="test_max_games">
|
|
</div>
|
|
|
|
{% elif workload == "TUNE" %}
|
|
|
|
<h3> SPSA Settings </h3>
|
|
|
|
<div class="row">
|
|
<label for="spsa_alpha"> Alpha </label> <input value="0.602" id="spsa_alpha" name="spsa_alpha">
|
|
</div>
|
|
<div class="row">
|
|
<label for="spsa_gamma"> Gamma </label> <input value="0.101" id="spsa_gamma" name="spsa_gamma">
|
|
</div>
|
|
<div class="row">
|
|
<label for="spsa_A_ratio"> A-Ratio </label> <input value="0.1" id="spsa_A_ratio" name="spsa_A_ratio">
|
|
</div>
|
|
<div class="row">
|
|
<label for="spsa_iterations"> Iterations </label> <input value="25000" id="spsa_iterations" name="spsa_iterations">
|
|
</div>
|
|
<div class="row">
|
|
<label for="spsa_pairs_per"> Pairs-Per </label> <input value="8" id="spsa_pairs_per" name="spsa_pairs_per">
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
<h3> General Settings </h3>
|
|
|
|
<div class="row">
|
|
<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 %}
|
|
</select>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="upload_pgns"> Upload PGNs </label>
|
|
<select id="upload_pgns" name="upload_pgns">
|
|
<option selected value="FALSE"> False </option>
|
|
<option value="COMPACT"> Compact </option>
|
|
<option value="VERBOSE"> Verbose </option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="priority"> Priority </label> <input value="0" id="priority" name="priority">
|
|
</div>
|
|
|
|
<div class="row">
|
|
<label for="throughput"> Throughput </label> <input value="1000" id="throughput" , name="throughput">
|
|
</div>
|
|
|
|
{% if workload == "TEST" %}
|
|
<div class="row">
|
|
<label for="workload_size"> Workload Size </label> <input id="workload_size" name="workload_size">
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
<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>
|
|
<option value="6-MAN"> 6-Man </option>
|
|
<option value="5-MAN"> 5-Man </option>
|
|
<option value="4-MAN"> 4-Man </option>
|
|
<option value="3-MAN"> 3-Man </option>
|
|
</select>
|
|
</div>
|
|
|
|
<h3> Adjudication Settings </h3>
|
|
<div class="row">
|
|
<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>
|
|
<option value="6-MAN"> 6-Man </option>
|
|
<option value="5-MAN"> 5-Man </option>
|
|
<option value="4-MAN"> 4-Man </option>
|
|
<option value="3-MAN"> 3-Man </option>
|
|
</select>
|
|
</div>
|
|
<div class="row">
|
|
<label for="win_adj"> Win ADJ. </label> <input id="win_adj" name="win_adj">
|
|
</div>
|
|
<div class="row">
|
|
<label for="draw_adj"> Draw ADJ. </label> <input id="draw_adj" name="draw_adj">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="submit" class="anchorbutton btn-start mt-3 mw-84" name="submit" value="{{submit_text}}">
|
|
</form>
|
|
|
|
<div class="form">
|
|
<div class="col-full">
|
|
<div id="test-mode-buttons">
|
|
<!-- Generated based on the selected Engine -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|