Datasets:

ArXiv:
File size: 2,015 Bytes
9f3bc09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash

# Script to run evaluations for missing queries from a text file
# Based on open_eval_template.sh structure

export CUDA_VISIBLE_DEVICES=3
# Check if correct number of arguments provided
if [ "$#" -ne 1 ]; then
    echo "Usage: $0 <model_name>"
    echo "Example: $0 modelscope"
    exit 1
fi

MODEL_NAME="$1"
QUERIES_FILE="./eval_vbench_results/$MODEL_NAME/queries_to_evaluate.txt"

# Check if queries file exists
if [ ! -f "$QUERIES_FILE" ]; then
    echo "Error: Queries file not found: $QUERIES_FILE"
    exit 1
fi

# Read all queries from file into an array
mapfile -t queries < "$QUERIES_FILE"

# Define models array (single model in this case)
models=("$MODEL_NAME")

# Define index for supplementary run (using supp-0 folder)
indexs=("supp-1")
timestamp=$(date +%Y-%m-%d-%H:%M:%S)

echo "========================================="
echo "Running supplementary evaluations"
echo "Model: $MODEL_NAME" 
echo "Total queries: ${#queries[@]}"
echo "Index: $indexs"
echo "========================================="

# Loop through indexs, models, and queries (following open_eval_template.sh structure)
for ind in "${indexs[@]}"; do
    for model in "${models[@]}"; do
        for query in "${queries[@]}"; do
            
            # Skip empty lines
            if [ -z "$query" ]; then
                continue
            fi
            
            echo "===ind: $ind, model: $model, query: $query===" | tee -a ./logs/$model/$ind.log

            export FOLDER_NAME="$ind/$timestamp-$(echo $query | tr ' ' '_' | tr -d '?')"            # Run the evaluation script (output to both terminal and log)
            python eval_agent_for_vbench_open.py --user_query "$query" --model $model --recommend 2>&1 | tee -a ./logs/$model/$ind.log

            unset FOLDER_NAME

        done
    done
done


echo "========================================="
echo "Evaluation complete!"
echo "Results saved in: eval_agent/eval_vbench_results/$MODEL_NAME/$indexs/"
echo "========================================="