Implement support for DATAGEN Workloads through the genfens interface (#200)
This commit is contained in:
1 parent
45302fa347
commit
2fcb7329ce
57 files changed
+1096
-131
No files matched your search
+47
-1
@@ -25,7 +25,7 @@ import traceback
|
||||
|
||||
from OpenSite.settings import PROJECT_PATH
|
||||
|
||||
OPENBENCH_STATIC_VERSION = 'v2'
|
||||
OPENBENCH_STATIC_VERSION = 'v3'
|
||||
|
||||
OPENBENCH_CONFIG = None # Initialized by OpenBench/apps.py
|
||||
|
||||
@@ -67,6 +67,7 @@ def load_engine_config(engine_name):
|
||||
|
||||
assert 'default' in conf['test_presets'].keys()
|
||||
assert 'default' in conf['tune_presets'].keys()
|
||||
assert 'default' in conf['datagen_presets'].keys()
|
||||
|
||||
for key, test_preset in conf['test_presets'].items():
|
||||
verify_engine_test_preset(test_preset)
|
||||
@@ -74,6 +75,9 @@ def load_engine_config(engine_name):
|
||||
for key, tune_preset in conf['tune_presets'].items():
|
||||
verify_engine_tune_preset(tune_preset)
|
||||
|
||||
for key, datagen_preset in conf['datagen_presets'].items():
|
||||
verify_engine_datagen_preset(datagen_preset)
|
||||
|
||||
except Exception as error:
|
||||
traceback.print_exc()
|
||||
print ('%s has errors on the configuration json' % (engine_name))
|
||||
@@ -191,3 +195,45 @@ def verify_engine_tune_preset(tune_preset):
|
||||
for key in tune_preset.keys():
|
||||
if key not in valid_keys:
|
||||
raise Exception('Contains invalid key: %s' % (key))
|
||||
|
||||
def verify_engine_datagen_preset(datagen_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',
|
||||
|
||||
'book_name',
|
||||
'upload_pgns',
|
||||
'priority',
|
||||
'throughput',
|
||||
'workload_size',
|
||||
'syzygy_wdl',
|
||||
|
||||
'syzygy_adj',
|
||||
'win_adj',
|
||||
'draw_adj',
|
||||
|
||||
'datagen_custom_genfens',
|
||||
'datagen_play_reverses',
|
||||
'datagen_max_games',
|
||||
]
|
||||
|
||||
for key in datagen_preset.keys():
|
||||
if key not in valid_keys:
|
||||
raise Exception('Contains invalid key: %s' % (key))
|
||||
Reference in new issue
Block a user