From cbfa2fcbdc27dfcbe0c5b43d0b51057168ae5c33 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 17 Sep 2024 11:05:10 +0300 Subject: [PATCH] scripts : verify py deps at the start of compare --- scripts/compare-commits.sh | 3 +++ scripts/compare-llama-bench.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/scripts/compare-commits.sh b/scripts/compare-commits.sh index 70679f4e56470..8b9b1ad39f384 100755 --- a/scripts/compare-commits.sh +++ b/scripts/compare-commits.sh @@ -8,6 +8,9 @@ fi set -e set -x +# verify at the start that the compare script has all the necessary dependencies installed +./scripts/compare-llama-bench.py --check + bench_args="${@:3}" rm -f llama-bench.sqlite > /dev/null diff --git a/scripts/compare-llama-bench.py b/scripts/compare-llama-bench.py index 92b9e682a9f20..e45e83ce8ea6f 100755 --- a/scripts/compare-llama-bench.py +++ b/scripts/compare-llama-bench.py @@ -92,6 +92,7 @@ "If the columns are manually specified, then the results for each unique combination of the " "specified values are averaged WITHOUT weighing by the --repetitions parameter of llama-bench." ) +parser.add_argument("--check", action="store_true", help="check if all required Python libraries are installed") parser.add_argument("-s", "--show", help=help_s) parser.add_argument("--verbose", action="store_true", help="increase output verbosity") @@ -99,6 +100,10 @@ logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO) +if known_args.check: + # Check if all required Python libraries are installed. Would have failed earlier if not. + sys.exit(0) + if unknown_args: logger.error(f"Received unknown args: {unknown_args}.\n") parser.print_help()