-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevaluate_qwen.sh
More file actions
34 lines (22 loc) · 1.06 KB
/
evaluate_qwen.sh
File metadata and controls
34 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Exit on any error
set -e
# =================== Configuration Variables ===================
MODEL_NAME="Qwen2.5-VL-7B"
NUM_GPUS=1
OUTPUT_DIR="eval_results"
CATEGORY="all"
PREDICTION_PATH="${OUTPUT_DIR}/${MODEL_NAME}"
OPENAI_API_KEY="" # Replace with your actual key or use environment variable
# ==============================================================
echo "Starting evaluation pipeline..."
# Derive prediction output path
# Ensure output directory exists
mkdir -p "${OUTPUT_DIR}"
echo "Step 1: Running model evaluation with Accelerate"s
accelerate launch --num_processes ${NUM_GPUS} evaluation/shotvl/evaluate_qwen.py --model ${MODEL_NAME} --reasoning --output-dir ${OUTPUT_DIR} --category "${CATEGORY}"
echo "Model evaluation completed. Predictions saved to: ${PREDICTION_PATH}"
# echo "Step 2: Calculating scores using OpenAI API"
# OPENAI_API_KEY=${OPENAI_API_KEY} python evaluation/calculate_scores.py --prediction_path ${PREDICTION_PATH} --category "${CATEGORY}"
# echo "Score calculation completed."
# echo "All steps finished successfully."