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 2.2 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
54
55
56
57
58
59
60
61
62
63
64
  1. from mlProject import logger
  2. from mlProject.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
  3. from mlProject.pipeline.stage_02_data_validation import DataValidationTrainingPipeline
  4. from mlProject.pipeline.stage_03_data_transformation import DataTransformationTrainingPipeline
  5. from mlProject.pipeline.stage_04_model_trainer import ModelTrainerTrainingPipeline
  6. from mlProject.pipeline.stage_05_model_evaluation import ModelEvaluationTrainingPipeline
  7. if __name__ == '__main__':
  8. # first stage
  9. STAGE_NAME = "Data Ingestion Stage"
  10. try:
  11. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  12. obj = DataIngestionTrainingPipeline()
  13. obj.main()
  14. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  15. except Exception as e:
  16. logger.exception(e)
  17. raise e
  18. # second stage
  19. STAGE_NAME = "Data Validation Stage"
  20. try:
  21. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  22. obj = DataValidationTrainingPipeline()
  23. obj.main()
  24. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  25. except Exception as e:
  26. logger.exception(e)
  27. raise e
  28. # third stage
  29. STAGE_NAME = "Data Tranformation Stage"
  30. try:
  31. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  32. obj = DataTransformationTrainingPipeline()
  33. obj.main()
  34. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  35. except Exception as e:
  36. logger.exception(e)
  37. raise e
  38. # forth stage
  39. STAGE_NAME = "Data Training Stage"
  40. try:
  41. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  42. obj = ModelTrainerTrainingPipeline()
  43. obj.main()
  44. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  45. except Exception as e:
  46. logger.exception(e)
  47. raise e
  48. # fifth stage
  49. STAGE_NAME = "Model Evaluation Stage"
  50. try:
  51. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  52. obj = ModelTrainerTrainingPipeline()
  53. obj.main()
  54. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  55. except Exception as e:
  56. logger.exception(e)
  57. raise e
Tip!

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

Comments

Loading...