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 3.3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
  1. from Healthyai import logger
  2. from Healthyai.pipeline.stage_01_diet_recomd_data_ingestion import DietRecomendationDataIngestionPipeline
  3. from Healthyai.pipeline.stage_02_diet_recomd_data_validation import DietRecomendationDataValidatePipeline
  4. from Healthyai.pipeline.stage_03_diet_recomd_model_trainer import DietRecomendationModelTrainingPipeline
  5. from Healthyai.pipeline.stage_04_food_classifi_data_ingestion import FoodDataIngeestionPipeLine
  6. from Healthyai.pipeline.stage_05_food_classifi_prebasemodel import PrepareBaseModelTrainingPipeline
  7. from Healthyai.pipeline.stage_06_food_classifi_training import ModelTrainingPipeline
  8. from Healthyai.pipeline.stage_07_food_classifi_evaluation import ModelEvaluationPipeline
  9. # Data Ingestion for the Diet Recomendation Pipeline
  10. STAGE_NAME = "Diet Recomendation Data Ingestion Stage"
  11. try:
  12. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  13. obj = DietRecomendationDataIngestionPipeline()
  14. obj.main()
  15. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  16. except Exception as e:
  17. logger.exception(e)
  18. raise e
  19. # Data Validation for the Diet Recomendation Pipeline
  20. STAGE_NAME = "Diet Recomendation Data Validation Stage"
  21. try:
  22. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  23. obj = DietRecomendationDataValidatePipeline()
  24. obj.main()
  25. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  26. except Exception as e:
  27. logger.exception(e)
  28. raise e
  29. # Model Trainer for the Diet Recomendation Pipeline
  30. STAGE_NAME = "Diet Recomendation Model Trainer Stage"
  31. try:
  32. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  33. obj = DietRecomendationModelTrainingPipeline()
  34. obj.main()
  35. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  36. except Exception as e:
  37. logger.exception(e)
  38. raise e
  39. # Data Ingestion for Food Image Classification
  40. STAGE_NAME = "Food Classification Data Ingestion"
  41. try:
  42. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  43. obj = FoodDataIngeestionPipeLine()
  44. obj.main()
  45. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  46. except Exception as e:
  47. raise e
  48. # PrepareBaseModel for Food Image Classification
  49. STAGE_NAME = "Food Classification PrepareBase Model"
  50. try:
  51. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  52. obj = PrepareBaseModelTrainingPipeline()
  53. obj.main()
  54. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  55. except Exception as e:
  56. raise e
  57. # ModelTraining for Food Image Classification
  58. STAGE_NAME = "Food Classification Model Trainig"
  59. try:
  60. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  61. obj = ModelTrainingPipeline()
  62. obj.main()
  63. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  64. except Exception as e:
  65. raise e
  66. STAGE_NAME = "Food Classification Model Evaluation"
  67. try:
  68. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Started <<<<<<<<<<<")
  69. obj = ModelEvaluationPipeline()
  70. obj.main()
  71. logger.info(f">>>>>>>>>> Stage {STAGE_NAME} Completed <<<<<<<<\n\nx============x")
  72. except Exception as e:
  73. raise e
Tip!

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

Comments

Loading...