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.5 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
  1. from cnnClassifier.utils import logger
  2. from cnnClassifier.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
  3. # from cnnClassifier.pipeline.stage_01_data_ingestion
  4. # import DataIngestionTrainingPipeline
  5. from cnnClassifier.pipeline.stage_02_prepare_base_model import PrepareBaseModelTrainingPipeline
  6. from cnnClassifier.pipeline.stage_03_model_trainer import ModelTrainingPipeline
  7. # # from cnnClassifier.pipeline.stage_04_model_evaluation import EvaluationPipeline
  8. STAGE_NAME = "Data Ingestion stage"
  9. try:
  10. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  11. obj = DataIngestionTrainingPipeline()
  12. obj.main()
  13. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  14. except Exception as e:
  15. logger.exception(e)
  16. raise e
  17. STAGE_NAME = "Prepare base model"
  18. try:
  19. logger.info(f"*******************")
  20. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  21. prepare_base_model = PrepareBaseModelTrainingPipeline()
  22. prepare_base_model.main()
  23. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  24. except Exception as e:
  25. logger.exception(e)
  26. raise e
  27. STAGE_NAME = "Training"
  28. try:
  29. logger.info(f"*******************")
  30. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  31. model_trainer = ModelTrainingPipeline()
  32. model_trainer.main()
  33. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  34. except Exception as e:
  35. logger.exception(e)
  36. raise e
Tip!

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

Comments

Loading...