Spaces:
Running
Running
File size: 775 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 | """CLI script to run the training pipeline."""
import sys
from pathlib import Path
# Add project root to path
project_root = Path(__file__).parent.parent
sys.path.insert(0, str(project_root))
from mlpipeline.pipeline.training_pipeline import TrainingPipeline
from mlpipeline.logging.logger import get_logger
logger = get_logger(__name__)
def main():
"""Run the complete training pipeline."""
try:
logger.info("Starting AutoML Training Pipeline...")
pipeline = TrainingPipeline()
pipeline.run_pipeline()
logger.info("✅ Training pipeline completed successfully!")
return 0
except Exception as e:
logger.error(f"❌ Training pipeline failed: {e}")
return 1
if __name__ == "__main__":
exit(main())
|