-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
27 lines (22 loc) · 798 Bytes
/
main.py
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
from TradePilot import logger
from TradePilot.pipeline.stage_01_price_ingestion import PriceIngestionTrainingPipeline
def run_pipeline(stage_name, pipeline_instance):
"""
Run a specific stage of the sentiment analysis pipeline.
Parameters:
- stage_name: str
Name of the pipeline stage.
- pipeline_instance: object
Instance of the pipeline stage to be executed.
Returns:
None
"""
try:
logger.info(f">>>>>> Stage {stage_name} started <<<<<<")
pipeline_instance.main()
logger.info(f">>>>>> Stage {stage_name} completed <<<<<<\n\nx==========x")
except Exception as e:
logger.exception(e)
raise e
if __name__ == "__main__":
run_pipeline("Price data Ingestion", PriceIngestionTrainingPipeline())