-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
41 lines (33 loc) · 1.21 KB
/
main.py
File metadata and controls
41 lines (33 loc) · 1.21 KB
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
from UNetRMultiClass import logger
from UNetRMultiClass.pipeline.stage_01_data_ingestion import (
DataIngestionTrainingPipeline,
)
from UNetRMultiClass.pipeline.stage_02_prepare_model import PrepareModelTrainingPipeline
from UNetRMultiClass.pipeline.stage_03_training import ModelTrainingPipeline
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} Completed <<<<<<\n\n x===============x")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Prepare Model"
try:
logger.info(f">>>>>> Stage {STAGE_NAME} Started <<<<<<")
obj = PrepareModelTrainingPipeline()
obj.main()
logger.info(f">>>>>> Stage {STAGE_NAME} Completed <<<<<<\n\n x===============x")
except Exception as e:
logger.exception(e)
raise e
STAGE_NAME = "Model Training"
try:
logger.info(f">>>>>> Stage {STAGE_NAME} Started <<<<<<")
data_ingestion = ModelTrainingPipeline()
data_ingestion.main()
logger.info(f">>>>>> Stage {STAGE_NAME} Completed <<<<<<\n\n x===============x")
except Exception as e:
logger.exception(e)
raise e