Complete the code to import the Airflow DAG class.
from airflow import [1]
The DAG class is the core component to define workflows in Airflow.
Complete the code to define the default arguments for the DAG.
default_args = {
'owner': 'airflow',
'start_date': [1]
}The start_date should be a fixed datetime object, not a dynamic call like datetime.now().
Fix the error in the DAG instantiation by completing the missing argument.
dag = DAG('ml_pipeline', default_args=default_args, schedule_interval=[1])
The schedule_interval expects a string like '@daily' or a cron expression, not a bare word or None() call.
Fill both blanks to create a PythonOperator task that runs a function named train_model.
train_task = PythonOperator(task_id='train', python_callable=[1], dag=[2])
The python_callable argument takes the function name train_model, and the dag argument links the task to the DAG object.
Fill both blanks to set task dependencies: preprocess_task runs before train_task, which runs before evaluate_task.
preprocess_task[1]train_task[2]evaluate_task
The >> operator in Airflow sets the order of tasks, meaning the left task runs before the right task.