Update configs; Ensure correctness of fields

This commit is contained in:
andrew committed 2023-11-21 20:46:44 -05:00
1 parent 5b56253dcf
commit acef6cba4f
6 files changed
+120 -37

No files matched your search

+6 -6
View File
@@ -37,28 +37,28 @@
"both_options" : "Threads=1 Hash=8",
"both_time_control" : "10.0+0.1",
"workload_size" : 32,
"bounds" : "[-2.00, 0.00]"
"test_bounds" : "[-2.00, 0.00]"
},
"LTC Simplify" : {
"both_options" : "Threads=1 Hash=64",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"bounds" : "[-2.00, 0.00]"
"test_bounds" : "[-2.00, 0.00]"
},
"STC Fixed" : {
"both_options" : "Threads=1 Hash=8",
"both_time_control" : "10.0+0.1",
"workload_size" : 32,
"games" : 20000
"test_max_games" : 20000
},
"LTC Fixed" : {
"both_options" : "Threads=1 Hash=64",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"games" : 20000
"test_max_games" : 20000
},
"SMP STC" : {
@@ -83,8 +83,8 @@
},
"STC" : {
"both_options" : "Threads=1 Hash=8",
"both_time_control" : "10.0+0.10"
"dev_options" : "Threads=1 Hash=8",
"dev_time_control" : "10.0+0.10"
}
}
}
+10 -10
View File
@@ -31,7 +31,7 @@
"both_options" : "Threads=1 Hash=64 MoveOverhead=100",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"bounds" : "[0.50, 2.50]"
"test_bounds" : "[0.50, 2.50]"
},
"SMP STC" : {
@@ -44,51 +44,51 @@
"both_options" : "Threads=14 Hash=256 MoveOverhead=100",
"both_time_control" : "30.0+0.3",
"workload_size" : 16,
"bounds" : "[0.50, 2.50]"
"test_bounds" : "[0.50, 2.50]"
},
"STC Simplification" : {
"both_options" : "Threads=1 Hash=16 MoveOverhead=100",
"both_time_control" : "10.0+0.10",
"workload_size" : 32,
"bounds" : "[-1.75, 0.25]"
"test_bounds" : "[-1.75, 0.25]"
},
"LTC Simplification" : {
"both_options" : "Threads=1 Hash=64 MoveOverhead=100",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"bounds" : "[-1.75, 0.25]"
"test_bounds" : "[-1.75, 0.25]"
},
"STC Regression" : {
"both_options" : "Threads=1 Hash=16 MoveOverhead=100",
"both_time_control" : "10.0+0.10",
"workload_size" : 32,
"book" : "8moves_v3.epd",
"games" : 40000
"book_name" : "8moves_v3.epd",
"test_max_games" : 40000
},
"LTC Regression" : {
"both_options" : "Threads=1 Hash=64 MoveOverhead=100",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"book" : "8moves_v3.epd",
"games" : 40000
"book_name" : "8moves_v3.epd",
"test_max_games" : 40000
},
"STC Fixed Games" : {
"both_options" : "Threads=1 Hash=16 MoveOverhead=100",
"both_time_control" : "10.0+0.10",
"workload_size" : 32,
"games" : 40000
"test_max_games" : 40000
},
"LTC Fixed Games" : {
"both_options" : "Threads=1 Hash=64 MoveOverhead=100",
"both_time_control" : "60.0+0.6",
"workload_size" : 8,
"games" : 40000
"test_max_games" : 40000
}
},
+9 -9
View File
@@ -39,7 +39,7 @@
},
"SMP LTC" : {
"both_options" : "Threads=15 Hash=1024 Minimal=true",
"both_options" : "Threads=15 Hash=256 Minimal=true",
"both_time_control" : "30.0+0.3",
"workload_size" : 16,
"test_bounds" : "[0.50, 2.50]"
@@ -100,23 +100,23 @@
"tune_presets" : {
"STC" : {
"options" : "Threads=1 Hash=16 Minimal=true",
"timecontrol" : "10.0+0.10"
"dev_options" : "Threads=1 Hash=16 Minimal=true",
"dev_time_control" : "10.0+0.10"
},
"MTC" : {
"options" : "Threads=1 Hash=32 Minimal=true",
"timecontrol" : "30.0+0.30"
"dev_options" : "Threads=1 Hash=32 Minimal=true",
"dev_time_control" : "30.0+0.30"
},
"LTC" : {
"options" : "Threads=1 Hash=64 Minimal=true",
"timecontrol" : "60.0+0.60"
"dev_options" : "Threads=1 Hash=64 Minimal=true",
"dev_time_control" : "60.0+0.60"
},
"VLTC" : {
"options" : "Threads=1 Hash=128 Minimal=true",
"timecontrol" : "180.0+1.80"
"dev_options" : "Threads=1 Hash=128 Minimal=true",
"dev_time_control" : "180.0+1.80"
}
}
}
+6 -6
View File
@@ -37,14 +37,14 @@
"both_options" : "Threads=1 Hash=32",
"both_time_control" : "8.0+0.08",
"workload_size" : 32,
"bounds" : "[-3.00, 0.00]"
"test_bounds" : "[-3.00, 0.00]"
},
"LTC Simplify" : {
"both_options" : "Threads=1 Hash=128",
"both_time_control" : "40.0+0.4",
"workload_size" : 8,
"bounds" : "[-3.00, 0.00]"
"test_bounds" : "[-3.00, 0.00]"
},
"SMP STC" : {
@@ -69,13 +69,13 @@
},
"STC" : {
"both_options" : "Threads=1 Hash=32",
"both_time_control" : "8.0+0.08"
"dev_options" : "Threads=1 Hash=32",
"dev_time_control" : "8.0+0.08"
},
"LTC" : {
"both_options" : "Threads=1 Hash=32",
"both_time_control" : "8.0+0.08"
"dev_options" : "Threads=1 Hash=32",
"dev_time_control" : "8.0+0.08"
}
}
}
+88 -5
View File
@@ -20,6 +20,8 @@
import json
import os
import sys
import traceback
from OpenSite.settings import PROJECT_PATH
@@ -56,16 +58,24 @@ def load_engine_config(engine_name):
with open(os.path.join(PROJECT_PATH, 'Engines', '%s.json' % (engine_name))) as fin:
conf = json.load(fin)
verify_engine_basics(engine_name, conf)
verify_engine_basics(conf)
verify_engine_build(engine_name, conf)
for key, test_preset in conf['test_presets'].items():
verify_engine_test_preset(test_preset)
for key, tune_preset in conf['tune_presets'].items():
verify_engine_tune_preset(tune_preset)
except Exception as error:
print (error)
print (engine_name)
traceback.print_exc()
print ('%s has errors on the configuration json' % (engine_name))
sys.exit()
return conf
def verify_engine_basics(engine_name, conf):
def verify_engine_basics(conf):
assert type(conf.get('private')) == bool
assert type(conf.get('nps')) == int and conf['nps'] > 0
@@ -87,4 +97,77 @@ def verify_engine_build(engine_name, conf):
else: # Public engines require a Makefile path and valid compilers
assert type(conf['build'].get('path')) == str
assert type(conf['build'].get('compilers')) == list
assert all(type(x) == str for x in conf['build']['compilers'])
assert all(type(x) == str for x in conf['build']['compilers'])
def verify_engine_test_preset(test_preset):
valid_keys = [
'both_branch',
'both_bench',
'both_network',
'both_options',
'both_time_control',
'dev_branch',
'dev_bench',
'dev_network',
'dev_options',
'dev_time_control',
'base_branch',
'base_bench',
'base_network',
'base_options',
'base_time_control',
'test_bounds',
'test_confidence',
'test_max_games',
'book_name',
'priority',
'throughput',
'workload_size',
'syzygy_wdl',
'syzygy_adj',
'win_adj',
'draw_adj',
]
for key in test_preset.keys():
if key not in valid_keys:
raise Exception('Contains invalid key: %s' % (key))
def verify_engine_tune_preset(tune_preset):
valid_keys = [
'dev_branch',
'dev_bench',
'dev_network',
'dev_options',
'dev_time_control',
'spsa_reporting_type',
'spsa_distribution_type',
'spsa_alpha',
'spsa_gamma',
'spsa_A_ratio',
'spsa_iterations',
'spsa_pairs_per',
'book_name',
'priority',
'throughput',
'syzygy_wdl',
'syzygy_adj',
'win_adj',
'draw_adj',
]
for key in tune_preset.keys():
if key not in valid_keys:
raise Exception('Contains invalid key: %s' % (key))
+1 -1
View File
@@ -140,7 +140,7 @@ function set_option(option_name, option_value) {
document.getElementById('test_confidence').value = 'N/A';
}
if (option_name == 'test_bounds') {
if (option_name == 'test_bounds' || option_name == 'test_confidence') {
document.getElementById('test_mode').value = "SPRT";
document.getElementById('test_max_games').value = 'N/A';
}