-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathrun.sh
More file actions
40 lines (34 loc) · 996 Bytes
/
run.sh
File metadata and controls
40 lines (34 loc) · 996 Bytes
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
#!/bin/bash
# Set variables
INPUT_FILE="Dataset/EvaLearn_Problem.json"
SEQ_FILE="Dataset/EvaLearn_Sequence.json"
OUTPUT_FILE="results.json"
WORKERS=5
JUDGE_MODEL="gpt-4o-2024-11-20"
CLIENT_MODEL="gpt-4o-2024-11-20"
LOG_FILE="evaluation_log.txt"
# Add API key variables
JUDGE_API_KEY="${OPENAI_API_KEY}"
CLIENT_API_KEY="${OPENAI_API_KEY}"
# Check input files
if [ ! -f "$INPUT_FILE" ]; then
echo "Error: Input file $INPUT_FILE does not exist"
exit 1
fi
if [ ! -f "$SEQ_FILE" ]; then
echo "Error: Sequence file $SEQ_FILE does not exist"
exit 1
fi
# Run evaluation script
echo "Starting evaluation..."
python Evaluate/evaluate.py \
--input "$INPUT_FILE" \
--seq "$SEQ_FILE" \
--output "$OUTPUT_FILE" \
--workers "$WORKERS" \
--judge-model "$JUDGE_MODEL" \
--client-model "$CLIENT_MODEL" \
--judge-api-key "$JUDGE_API_KEY" \
--client-api-key "$CLIENT_API_KEY" \
2>&1 | tee "$LOG_FILE"
echo "Evaluation complete! Results saved to $OUTPUT_FILE"