Seyomi commited on
Commit
df47992
Β·
verified Β·
1 Parent(s): 0b0933a

Create scheduler/airflow_dag.py

Browse files
Files changed (1) hide show
  1. scheduler/airflow_dag.py +13 -0
scheduler/airflow_dag.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from airflow import DAG
2
+ from airflow.operators.python import PythonOperator
3
+ from datetime import datetime
4
+ import subprocess
5
+
6
+ def run_pipeline():
7
+ subprocess.run(["python", "pipeline/train_pipeline.py"])
8
+
9
+ with DAG("multimodal_forecasting", start_date=datetime(2025, 1, 1), schedule_interval="@daily", catchup=False) as dag:
10
+ task = PythonOperator(
11
+ task_id="run_training_pipeline",
12
+ python_callable=run_pipeline
13
+ )