From 36fc79487b986714bad5d730682ca2e812d8228d Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 25 Sep 2023 17:50:21 -0400 Subject: [PATCH] Better client output; Kick to v17 --- Client/Client.py | 12 ++++++------ OpenBench/config.py | 2 +- OpenBench/workloads/get_workload.py | 2 ++ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Client/Client.py b/Client/Client.py index f7d96e0..e107adc 100644 --- a/Client/Client.py +++ b/Client/Client.py @@ -44,7 +44,7 @@ from concurrent.futures import ThreadPoolExecutor ## Basic configuration of the Client. These timeouts can be changed at will -CLIENT_VERSION = 16 # Client version to send to the Server +CLIENT_VERSION = 17 # Client version to send to the Server TIMEOUT_HTTP = 30 # Timeout in seconds for HTTP requests TIMEOUT_ERROR = 10 # Timeout in seconds when any errors are thrown TIMEOUT_WORKLOAD = 30 # Timeout in seconds between workload requests @@ -481,7 +481,7 @@ class Cutechess: # Join options together in the Cutechess format options = ' option.'.join([''] + re.findall(r'"[^"]*"|\S+', options)) - return '-engine dir=Engines/ cmd=./%s proto=uci %s%s name=%s-%s' % (command, control, options, name, branch) + return '-engine dir=Engines/ cmd=./%s proto=uci %s%s name=%s' % (command, control, options, branch) @staticmethod def pgnout_settings(config, timestamp, cutechess_idx): @@ -1128,13 +1128,13 @@ def download_opening_book(config): def download_network_weights(config, branch): # Some tests may not use Neural Networks - engine_name = config.workload['test'][branch]['engine'] - network_sha = config.workload['test'][branch]['network'] + engine_name = config.workload['test'][branch]['engine'] + network_sha = config.workload['test'][branch]['network'] + network_name = config.workload['test'][branch]['netname'] if not network_sha or network_sha == 'None': return None # Log that we are obtaining a Neural Network - pattern = 'Fetching Neural Network [ %s, %-4s ]' - print(pattern % (network_sha, branch.upper())) + print ('Fetching Neural Network [ %s, %-4s ]' % (branch, network_name)) # Fetch the Netural Network if we do not already have it network_path = os.path.join('Networks', network_sha) diff --git a/OpenBench/config.py b/OpenBench/config.py index 583806e..dc7e379 100644 --- a/OpenBench/config.py +++ b/OpenBench/config.py @@ -42,7 +42,7 @@ REQUIRE_MANUAL_REGISTRATION = False # Disable the public facing registration pag OPENBENCH_CONFIG = { # Server Client version control - 'client_version' : 16, + 'client_version' : 17, # Generic Error Messages useful to those setting up their own instance 'error' : { diff --git a/OpenBench/workloads/get_workload.py b/OpenBench/workloads/get_workload.py index a826d7a..45b8172 100644 --- a/OpenBench/workloads/get_workload.py +++ b/OpenBench/workloads/get_workload.py @@ -208,6 +208,7 @@ def workload_to_dictionary(test, result, machine): 'engine' : test.dev_engine, 'options' : test.dev_options, 'network' : test.dev_network, + 'netname' : test.dev_netname, 'time_control' : test.dev_time_control, 'nps' : OPENBENCH_CONFIG['engines'][test.dev_engine]['nps'], 'build' : OPENBENCH_CONFIG['engines'][test.dev_engine]['build'], @@ -223,6 +224,7 @@ def workload_to_dictionary(test, result, machine): 'engine' : test.base_engine, 'options' : test.base_options, 'network' : test.base_network, + 'netname' : test.base_netname, 'time_control' : test.base_time_control, 'nps' : OPENBENCH_CONFIG['engines'][test.base_engine]['nps'], 'build' : OPENBENCH_CONFIG['engines'][test.base_engine]['build'],