From 1bb4c1f0cc9307daedfff040e0148b00dc306f09 Mon Sep 17 00:00:00 2001 From: Donato Capitella Date: Mon, 17 Nov 2025 11:01:19 +0000 Subject: [PATCH] improve logic to check if a benchmakr as already been run --- benchmark/run_rpc_benchmarks.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/benchmark/run_rpc_benchmarks.sh b/benchmark/run_rpc_benchmarks.sh index e2bd8c4..9e638b2 100755 --- a/benchmark/run_rpc_benchmarks.sh +++ b/benchmark/run_rpc_benchmarks.sh @@ -132,6 +132,22 @@ ensure_models_exist() { done } +has_pending_runs() { + local env="$1" + local suffix="$2" + + for model_path in "${RESOLVED_MODELS[@]}"; do + local model_name + model_name="$(basename "${model_path}" .gguf)" + local log_file="$RESULTDIR/${model_name}__${env}${suffix}__rpc.log" + if [[ ! -s "$log_file" ]]; then + return 0 # still work to do + fi + done + + return 1 # all logs already exist +} + start_remote_rpc() { local env="$1" local image="$2" @@ -271,6 +287,11 @@ run_all() { echo echo "==== ${env}${suffix} -> ${image} ====" + if ! has_pending_runs "$env" "$suffix"; then + echo "[SKIP] ${env}${suffix} already has logs for all models - moving on." + continue + fi + CURRENT_REMOTE_ENV="${env}${suffix}" local remote_pid remote_pid="$(start_remote_rpc "$env" "$image" "$mode" "$suffix" | tr -d '\r')"