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.6 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
51
52
53
  1. from customer_churn import logger
  2. from customer_churn.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
  3. from customer_churn.pipeline.stage_02_data_transformation import DatatransformationTrainingPipeline
  4. from customer_churn.pipeline.stage_03_model_trainer import ModelTrainingPipeline
  5. from box.exceptions import BoxValueError
  6. STAGE_NAME = "Data Ingestion Stage"
  7. if __name__ == '__main__':
  8. try:
  9. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  10. obj = DataIngestionTrainingPipeline()
  11. obj.main()
  12. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  13. except BoxValueError:
  14. raise ValueError("Error occured in Data Ingestion...............")
  15. except Exception as e:
  16. raise e
  17. STAGE_NAME = "Data Transformation Stage"
  18. if __name__ == '__main__':
  19. try:
  20. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  21. obj = DatatransformationTrainingPipeline()
  22. obj.main()
  23. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  24. except BoxValueError:
  25. raise ValueError("Error occured in Data Ingestion...............")
  26. except Exception as e:
  27. raise e
  28. STAGE_NAME = "Model Training Stage"
  29. if __name__ == '__main__':
  30. try:
  31. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  32. obj = ModelTrainingPipeline()
  33. obj.main()
  34. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  35. except BoxValueError:
  36. raise ValueError("Error occured in Data Ingestion...............")
  37. except Exception as e:
  38. raise e
Tip!

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

Comments

Loading...