From 4ba02e99634144cfd62fcfa55249eec057952074 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Mon, 30 Dec 2024 19:15:56 -0500 Subject: [PATCH] fix: training pipeline quits unused uci workers --- nnue/batch_pgn_data.py | 2 +- nnue/process_pgn_data.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/nnue/batch_pgn_data.py b/nnue/batch_pgn_data.py index 3df1e6e..20f2314 100755 --- a/nnue/batch_pgn_data.py +++ b/nnue/batch_pgn_data.py @@ -22,7 +22,7 @@ from pathlib import Path parser = argparse.ArgumentParser() parser.add_argument("files", nargs="+", type=Path) -parser.add_argument("--batch-size", type=int, help="Number of games to save in each output file.", default=8) +parser.add_argument("--batch-size", type=int, help="Number of games to save in each output file. Set this to two to four times the amount of concurrent workers used in the processing step.", default=8) parser.add_argument("--output-folder", type=Path, help="Folder to save batched games in.", default=Path("batches")) args = parser.parse_args() diff --git a/nnue/process_pgn_data.py b/nnue/process_pgn_data.py index 5681d7c..ab91652 100755 --- a/nnue/process_pgn_data.py +++ b/nnue/process_pgn_data.py @@ -160,6 +160,8 @@ async def worker(game_generator: AsyncIterator[pgn.Game]) -> None: await output_queue.put((board.fen(), tensor, int(eval_abs), wdl)) + await engine.quit() + async def analyse_games(file: Path): """Task that manages reading PGNs and analyzing them."""