-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (31 loc) · 1.28 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
from src.textsummarizer.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
from src.textsummarizer.pipeline.stage_02_data_validation import DataValidationTrainingPipeline
from src.textsummarizer.pipeline.stage_03_data_transformation import DataTransformationTrainingPipeline
from src.textsummarizer.logging import logger
STAGE_NAME = "Data Ingestion stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
data_ingestion = DataIngestionTrainingPipeline()
data_ingestion.main()
logger.info(f">>>>>> stage {STAGE_NAME} ended <<<<<<\n\nx========x")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Data Validation stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
data_validation = DataValidationTrainingPipeline()
data_validation.main()
logger.info(f">>>>>> stage {STAGE_NAME} ended <<<<<<\n\nx========x")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Data Transformation stage"
try:
logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
data_transformation = DataTransformationTrainingPipeline()
data_transformation.main()
logger.info(f">>>>>> stage {STAGE_NAME} ended <<<<<<\n\nx========x")
except Exception as e:
logger.exception(e)
raise e