-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
66 lines (46 loc) · 1.91 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
from src.wind_prediction.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
from src.wind_prediction.pipeline.stage_02_data_validation import DataValidationTrainingPipeline
from src.wind_prediction.pipeline.stage_03_data_transformation import DataTransformationTrainingPipeline
from src.wind_prediction.pipeline.stage_04_model_trainer import ModelTrainerPipeline
from src.wind_prediction.pipeline.stage_05_model_evaluation import ModelEvaluationPipeline
from src.wind_prediction import logger
stage_name = "Data Ingestion stage"
try:
logger.info(f"******{stage_name} started******")
obj = DataIngestionTrainingPipeline()
obj.main()
logger.info(f"******{stage_name} completed******")
except Exception as e:
logger.info(e)
stage_name = "Data Validation stage"
try:
logger.info(f"******{stage_name} started******")
obj = DataValidationTrainingPipeline()
obj.main()
logger.info(f"******{stage_name} completed******")
except Exception as e:
logger.info(e)
stage_name = "Data Transformation stage"
try:
logger.info(f"******{stage_name} started******")
obj = DataTransformationTrainingPipeline()
obj.main()
logger.info(f"******{stage_name} completed******")
except Exception as e:
logger.info(e)
stage_name = "Model Trainer stage"
try:
logger.info(f"******{stage_name} started******")
obj = ModelTrainerPipeline()
obj.main()
logger.info(f"******{stage_name} completed******")
except Exception as e:
logger.info(e)
stage_name = "Model Evaluation stage"
try:
logger.info(f"******{stage_name} started******")
obj = ModelEvaluationPipeline()
obj.main()
logger.info(f"******{stage_name} completed******")
except Exception as e:
logger.info(e)