-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·56 lines (47 loc) · 1.16 KB
/
test.sh
File metadata and controls
executable file
·56 lines (47 loc) · 1.16 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Run tests for SQL Category Classifier
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "=============================================="
echo "SQL Category Classifier - Test & Validation"
echo "=============================================="
echo ""
# Activate virtual environment
if [ -f "venv/bin/activate" ]; then
source venv/bin/activate
else
echo "Error: Virtual environment not found. Run ./setup.sh first."
exit 1
fi
# Check for trained model
if [ ! -f "models/best_model.pt" ]; then
echo "Error: No trained model found. Run ./run_train.sh first."
exit 1
fi
# Parse arguments
MODE=${1:-test}
cd src/training
case $MODE in
test)
echo "Running test evaluation..."
python test.py
;;
validate)
echo "Running validation..."
python validate.py
;;
both)
echo "Running validation..."
python validate.py
echo ""
echo "Running test evaluation..."
python test.py
;;
*)
echo "Usage: ./run_test.sh [test|validate|both]"
exit 1
;;
esac
echo ""
echo "Done! Results saved to logs/"