-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrain.sh
More file actions
executable file
·33 lines (26 loc) · 791 Bytes
/
train.sh
File metadata and controls
executable file
·33 lines (26 loc) · 791 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
#!/bin/bash
# Training script for SQL Category Classifier
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "=============================================="
echo "SQL Category Classifier - Training"
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 training data
if [ ! -f "data/text-to-sql-100K.csv" ] && [ ! -f "data/merged_data.csv" ]; then
echo "Error: No training data found in data/ directory."
exit 1
fi
# Run training
cd src/training
python train.py
echo ""
echo "Training complete! Model saved to models/best_model.pt"