File size: 2,014 Bytes
830ee7a
0e43e41
 
 
830ee7a
86c3c59
 
830ee7a
 
 
 
 
 
372f5f8
830ee7a
 
 
0e43e41
 
 
 
 
 
 
372f5f8
0e43e41
 
 
 
 
 
 
 
 
 
 
372f5f8
0e43e41
 
 
 
 
 
 
 
 
 
 
372f5f8
0e43e41
 
 
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
from insurancePP.pipeline.stage1_data_ingestion import DataIngestionTrainingPipeline
from insurancePP.pipeline.stage2_data_validation import DataValidationPipeline
from insurancePP.pipeline.stage3_data_transformation import DataTransformationPipeline
from insurancePP.pipeline.stage4_model_trainer import ModelTrainingPipeline
# from textSummerizer.pipeline.stage5_model_evaluation import ModelEvaluationPipeline
from insurancePP.logging import logger

STAGE_NAME = 'data_ingestion_training'
try:
    logger.info(f'>>>>> stage {STAGE_NAME} has started <<<<<')
    data_ingestion_training_pipeline = DataIngestionTrainingPipeline()
    data_ingestion_training_pipeline.main()
    logger.info(f'>>>>> stage {STAGE_NAME} has completed <<<<<')
    logger.info('\n')
except Exception as e:
    logger.error(f'>>>>> stage {STAGE_NAME} has failed <<<<<')
    raise e

STAGE_NAME = 'data_validation_training'
try:
    logger.info(f'>>>>> stage {STAGE_NAME} has started <<<<<')
    data_validation_pipeline = DataValidationPipeline()
    data_validation_pipeline.main()
    logger.info(f'>>>>> stage {STAGE_NAME} has completed <<<<<')
    logger.info('\n')
except Exception as e:
    logger.error(f'>>>>> stage {STAGE_NAME} has failed <<<<<')
    raise e


STAGE_NAME = 'data_transformation'
try:
    logger.info(f'>>>>> stage {STAGE_NAME} has started <<<<<')
    data_transformation_pipeline = DataTransformationPipeline()
    data_transformation_pipeline.main()
    logger.info(f'>>>>> stage {STAGE_NAME} has completed <<<<<')
    logger.info('\n')
except Exception as e:
    logger.error(f'>>>>> stage {STAGE_NAME} has failed <<<<<')
    raise e


STAGE_NAME = 'model_training'
try:
    logger.info(f'>>>>> stage {STAGE_NAME} has started <<<<<')
    model_training_pipeline = ModelTrainingPipeline()
    model_training_pipeline.main()
    logger.info(f'>>>>> stage {STAGE_NAME} has completed <<<<<')
    logger.info('\n')
except Exception as e:
    logger.error(f'>>>>> stage {STAGE_NAME} has failed <<<<<')
    raise e