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

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

Comments

Loading...