Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

main.py 1.9 KB

You have to be logged in to leave a comment. Sign In
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
  1. from src.logging.logger import logging
  2. from src.exception.exception import CustomException
  3. import os,sys
  4. from src.pipline.data_ingestion_pipline import DataIngestionPipline
  5. from src.pipline.data_transformation_pipline import DataTransformationPipline
  6. from src.pipline.model_train_pipline import ModelTrainPipline
  7. from src.pipline.model_eval_pipline import ModelEvalPipline
  8. STAGE_NAME = "Data Ingestion stage"
  9. if __name__ == '__main__':
  10. try:
  11. logging.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  12. obj = DataIngestionPipline()
  13. obj.pipline()
  14. logging.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  15. except Exception as e:
  16. logging.info('error occured ',str(e))
  17. STAGE_NAME = "Data Transformation stage"
  18. if __name__ == '__main__':
  19. try:
  20. logging.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  21. obj = DataTransformationPipline()
  22. obj.pipline()
  23. logging.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  24. except Exception as e:
  25. logging.info('error occured ',str(e))
  26. raise CustomException(sys,e)
  27. STAGE_NAME = "Model Train stage"
  28. if __name__ == '__main__':
  29. try:
  30. logging.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  31. obj = ModelTrainPipline()
  32. obj.pipline()
  33. logging.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  34. except Exception as e:
  35. logging.info('error occured',str(e))
  36. raise CustomException(sys,e)
  37. # STAGE_NAME = "Model eval stage"
  38. # if __name__ == '__main__':
  39. # try:
  40. # logging.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  41. # obj = ModelEvalPipline()
  42. # obj.pipline()
  43. # logging.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  44. # except Exception as e:
  45. # logging.info('error occured',str(e))
  46. # raise CustomException(sys,e)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...