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')"