Skip to content

Commit 0d2f22e

Browse files
authored
scripts : verify py deps at the start of compare (ggml-org#9520)
1 parent 6443ddd commit 0d2f22e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

scripts/compare-commits.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ fi
88
set -e
99
set -x
1010

11+
# verify at the start that the compare script has all the necessary dependencies installed
12+
./scripts/compare-llama-bench.py --check
13+
1114
bench_args="${@:3}"
1215

1316
rm -f llama-bench.sqlite > /dev/null

scripts/compare-llama-bench.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,18 @@
9292
"If the columns are manually specified, then the results for each unique combination of the "
9393
"specified values are averaged WITHOUT weighing by the --repetitions parameter of llama-bench."
9494
)
95+
parser.add_argument("--check", action="store_true", help="check if all required Python libraries are installed")
9596
parser.add_argument("-s", "--show", help=help_s)
9697
parser.add_argument("--verbose", action="store_true", help="increase output verbosity")
9798

9899
known_args, unknown_args = parser.parse_known_args()
99100

100101
logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO)
101102

103+
if known_args.check:
104+
# Check if all required Python libraries are installed. Would have failed earlier if not.
105+
sys.exit(0)
106+
102107
if unknown_args:
103108
logger.error(f"Received unknown args: {unknown_args}.\n")
104109
parser.print_help()

0 commit comments

Comments
 (0)