Spaces:
Sleeping
Sleeping
File size: 1,741 Bytes
47488ce |
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 61 62 63 |
import sys
sys.path.append("./src")
from kidney_classification.pipeline.stage_04_model_evaluation_with_mlflow import (
EvaluationPipeline,
)
from kidney_classification.pipeline.stage_03_model_training import ModelTrainingPipeline
from kidney_classification.pipeline.stage_02_prepare_base_model import (
PrepareBaseModelTrainingPipeline,
)
from kidney_classification.pipeline.stage_01_data_ingestion import (
DataIngestionTrainingPipeline,
)
from kidney_classification import logger
STAGE_NAME = "Data Ingestion"
try:
logger.info(f"-------------Running stage: {STAGE_NAME}-------------")
pipeline = DataIngestionTrainingPipeline()
pipeline.main()
logger.info(f"-------------Stage: {STAGE_NAME} completed-------------")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Prepare base model"
try:
logger.info(f"-------------Running stage: {STAGE_NAME}-------------")
pipeline = PrepareBaseModelTrainingPipeline()
pipeline.main()
logger.info(f"-------------Stage: {STAGE_NAME} completed-------------")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Training Model"
try:
logger.info(f"-------------Running stage: {STAGE_NAME}-------------")
pipeline = ModelTrainingPipeline()
pipeline.main()
logger.info(f"-------------Stage: {STAGE_NAME} completed-------------")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Evaluation Stage"
try:
logger.info(f"-------------Running stage: {STAGE_NAME}-------------")
pipeline = EvaluationPipeline()
pipeline.main()
logger.info(f"-------------Stage: {STAGE_NAME} completed-------------")
except Exception as e:
logger.exception(e)
raise e
|