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
  1. from src.mlProject import logger
  2. from mlProject.pipeline.stage_01_data_ingestion import DataIngestionTrainingPipeline
  3. from mlProject.pipeline.stage_02_data_validation import DataValidationTrainingPipeline
  4. STAGE_NAME = "Data Ingestion stage"
  5. try:
  6. # Log start of the data ingestion stage
  7. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  8. # Instantiate the DataIngestionTrainingPipeline object
  9. pipeline = DataIngestionTrainingPipeline()
  10. # Execute the main method to run the data ingestion pipeline
  11. pipeline.main()
  12. # Log completion of the data ingestion stage
  13. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  14. except Exception as e:
  15. # Log any exceptions that occur during the pipeline execution
  16. logger.exception(e)
  17. raise e # Re-raise the exception for further handling
  18. STAGE_NAME = "Data Validation Stage"
  19. try:
  20. # Log start of the data validation stage
  21. logger.info(f">>>>>> stage {STAGE_NAME} started <<<<<<")
  22. # Instantiate the DataValidationTrainingPipeline object
  23. pipeline = DataValidationTrainingPipeline()
  24. # Execute the main method to run the data validation pipeline
  25. pipeline.main()
  26. # Log completion of the data validation stage
  27. logger.info(f">>>>>> stage {STAGE_NAME} completed <<<<<<\n\nx==========x")
  28. except Exception as e:
  29. # Log any exceptions that occur during the pipeline execution
  30. logger.exception(e)
  31. raise e # Re-raise the exception for further handling
Tip!

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

Comments

Loading...