-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
62 lines (56 loc) · 2.53 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
from src.utils.common import logger
from src.pipelines.data_ingestion import DataIngestionTrainingPipeline
from src.pipelines.data_validation import DataValidationTrainingPipeline
from src.pipelines.data_labeling import DataLabelingTrainingPipeline
from src.pipelines.data_transformation import DataTransformationTrainingPipeline
from src.pipelines.model_trainer import ModelTrainerTrainingPipeline
from src.pipelines.model_evaluation import ModelEvaluationTrainingPipeline
if __name__ == "__main__":
STAGE_NAME = "Data ingestion stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
data_ingestion_training_pipeline = DataIngestionTrainingPipeline()
data_ingestion_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)
STAGE_NAME = "Data validation stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
data_validation_training_pipeline = DataValidationTrainingPipeline()
data_validation_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)
STAGE_NAME = "Data labeling stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
data_labeling_training_pipeline = DataLabelingTrainingPipeline()
data_labeling_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)
STAGE_NAME = "Data transformation stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
data_transformation_training_pipeline = DataTransformationTrainingPipeline()
data_transformation_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)
STAGE_NAME = "Model training stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
model_trainer_training_pipeline = ModelTrainerTrainingPipeline()
model_trainer_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)
STAGE_NAME = "Model training stage"
try:
logger.info(f">>>>>> {STAGE_NAME} started <<<<<<")
model_evaluation_training_pipeline = ModelEvaluationTrainingPipeline()
model_evaluation_training_pipeline.run()
logger.info(f">>>>>> {STAGE_NAME} completed <<<<<<")
except Exception as e:
logger.error(e)