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

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

Comments

Loading...