Spaces:
Running
Running
| # 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 | |
| ``` | |