From 1f3ac508494d420f3905f501abf9b18327fa38cd Mon Sep 17 00:00:00 2001 From: Chris McCarthy Date: Thu, 20 Jul 2023 10:28:19 +0100 Subject: [PATCH] #1632 - Fixed output directory clear bug. Added gputil to dev deps. --- benchmark/primaite_benchmark.py | 3 ++- pyproject.toml | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/benchmark/primaite_benchmark.py b/benchmark/primaite_benchmark.py index 55a9aed5..8c947435 100644 --- a/benchmark/primaite_benchmark.py +++ b/benchmark/primaite_benchmark.py @@ -32,7 +32,8 @@ _RESULTS_ROOT.mkdir(exist_ok=True, parents=True) _OUTPUT_ROOT: Final[Path] = _BENCHMARK_ROOT / "output" # Clear and recreate the output directory -shutil.rmtree(_OUTPUT_ROOT) +if _OUTPUT_ROOT.exists(): + shutil.rmtree(_OUTPUT_ROOT) _OUTPUT_ROOT.mkdir() _TRAINING_CONFIG_PATH = _BENCHMARK_ROOT / "config" / "benchmark_training_config.yaml" diff --git a/pyproject.toml b/pyproject.toml index 81ee9105..d5d9cd1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,7 @@ dev = [ "build==0.10.0", "flake8==6.0.0", "furo==2023.3.27", + "gputil==1.4.0", "pip-licenses==4.3.0", "pre-commit==2.20.0", "pylatex==1.4.1",