Spaces:
Running
Running
File size: 1,200 Bytes
cbb53b6 | 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 | # Utility Scripts
Simple CLI scripts for common operations.
## Available Scripts
### 1. Train Pipeline
Run the complete training pipeline (all 7 stages):
```bash
python scripts/train.py
```
### 2. Evaluate Model
Evaluate the trained model on test data:
```bash
# Use default model path
python scripts/evaluate.py
# Or specify custom model path
python scripts/evaluate.py --model-path artifacts/model_trainer/model
```
### 3. Start API Server
Start the FastAPI server:
```bash
# Default (localhost:8000)
python scripts/serve.py
# Custom host/port
python scripts/serve.py --host 0.0.0.0 --port 8080
# Development mode with auto-reload
python scripts/serve.py --reload
```
### 4. Initialize Airflow
Set up Airflow database and create admin user:
```bash
python scripts/init_db.py
```
Then start Airflow services:
```bash
airflow scheduler # Terminal 1
airflow webserver # Terminal 2
```
## Quick Examples
```bash
# Full workflow
python scripts/train.py # Train model
python scripts/evaluate.py # Evaluate model
python scripts/serve.py --reload # Start API server
# Airflow setup
python scripts/init_db.py # Initialize
airflow webserver # Start UI
```
|