-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.py
68 lines (55 loc) · 2.1 KB
/
main.py
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
64
65
66
67
68
from src.Mlflow_Project import logger
from src.Mlflow_Project.pipeline.stage_01_data_ingestion import DataIngestionPipeline
from src.Mlflow_Project.pipeline.stage_02_data_cleaning import DataCleaningPipeline
from src.Mlflow_Project.pipeline.stage_03_data_validation import DataValidationPipeline
from src.Mlflow_Project.pipeline.stage_04_data_transformation import DataTransformationPipeline
from src.Mlflow_Project.pipeline.stage_05_model_trainer import ModelTrainerPipeline
from src.Mlflow_Project.pipeline.stage_06_model_evaluation import ModelEvaluationPipeline
STAGE_NAME = "Data Ingestion Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = DataIngestionPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)
STAGE_NAME = "Data Cleaning Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = DataCleaningPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)
STAGE_NAME = "Data Validation Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = DataValidationPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)
STAGE_NAME = "Data Transformation Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = DataTransformationPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)
STAGE_NAME = "Model Trainer Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = ModelTrainerPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)
STAGE_NAME = "Model Evaluation Stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<<")
obj = ModelEvaluationPipeline()
obj.main()
logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<")
except Exception as e:
logger.exception(e)