File size: 1,704 Bytes
85bba48
4de2404
cb7cafb
f2492e6
85bba48
 
 
 
 
 
 
 
4de2404
 
 
 
 
 
 
 
cb7cafb
 
 
 
 
 
 
 
 
 
 
 
 
4de2404
f2492e6
 
 
 
 
 
 
 
 
 
 
 
85bba48
 
 
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
from textsummarizer.pipeline.stage_01_data_ingestion import DataIngestionPipeline
from textsummarizer.pipeline.stage_02_data_validation import DataValidationPipeline
from textsummarizer.pipeline.stage_03_data_transformation import DataTransformationPipeline
from textsummarizer.pipeline.stage_04_model_trainer import ModelTrainerPipeline
from textsummarizer.logging import logger

STAGE_NAME = "Data Ingestion stage"
try:
   logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") 
   data_ingestion = DataIngestionPipeline()
   data_ingestion.main()
   logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\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 = DataValidationPipeline()
   data_validation.main()
   logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
except Exception as e:
        logger.exception(e)
        raise e
     
     
STAGE_NAME = "Data Trnasformation stage"
try:
   logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") 
   data_transformaion = DataTransformationPipeline()
   data_transformaion.main()
   logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
except Exception as e:
        logger.exception(e)
        raise e
     
     
     
STAGE_NAME = "Data Traniner stage"
try:
   logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<") 
   model_tranier = ModelTrainerPipeline()
   model_tranier.main()
   logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
except Exception as e:
        logger.exception(e)
        raise e