From c66e7f4c0a00510b72f0686ee8b7078ae577f38e Mon Sep 17 00:00:00 2001 From: Andrew Grant Date: Sat, 21 Sep 2024 17:05:43 -0400 Subject: [PATCH] Restore stepping of book_index This is also needed for unique PGN naming. Stopping the stepping, for datagen, was a mistake, predicated on the notion that we only needed the book_index to handle book seeding. --- OpenBench/workloads/get_workload.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenBench/workloads/get_workload.py b/OpenBench/workloads/get_workload.py index 1703d94..8d3a49e 100644 --- a/OpenBench/workloads/get_workload.py +++ b/OpenBench/workloads/get_workload.py @@ -248,12 +248,13 @@ def workload_to_dictionary(test, result, machine): cutechess_cnt = workload['distribution']['cutechess-count'] pairs_per_cnt = workload['distribution']['games-per-cutechess'] // 2 + per_opening = 2 if (test.test_mode == 'DATAGEN' and not test.play_reverses) else 1 - if test.test_mode != 'DATAGEN': - test.book_index += cutechess_cnt * pairs_per_cnt - else: + test.book_index += cutechess_cnt * pairs_per_cnt * per_opening + + if test.test_mode == 'DATAGEN': workload['test']['genfens_seeds'] = [ - random.randint(0, 2**32 - 1) for x in range(machine.info['concurrency'])] + random.randint(0, 2**31 - 1) for x in range(machine.info['concurrency'])] test.save()