0
0
MLOpsdevops~20 mins

Apache Airflow for ML orchestration in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Airflow ML Orchestration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Output of Airflow DAG run command
You run the command airflow dags trigger example_ml_pipeline on your terminal. What is the expected immediate output?
ASyntaxError: invalid syntax in DAG file
BNo output, command hangs indefinitely
CError: DAG 'example_ml_pipeline' not found
DCreated <DagRun example_ml_pipeline @ 2024-06-01T12:00:00+00:00: manual__2024-06-01T12:00:00+00:00, externally triggered: True>
Attempts:
2 left
💡 Hint
Think about what happens when you trigger a DAG manually.
🧠 Conceptual
intermediate
2:00remaining
Purpose of Airflow Sensors in ML pipelines
In an ML pipeline orchestrated by Airflow, what is the main purpose of a Sensor task?
ATo wait for an external event or file before continuing the pipeline
BTo train the ML model using GPU resources
CTo send email notifications after pipeline completion
DTo clean up temporary files after pipeline execution
Attempts:
2 left
💡 Hint
Sensors are special tasks that pause execution until a condition is met.
🔀 Workflow
advanced
3:00remaining
Correct order of Airflow tasks for ML model deployment
Arrange the following Airflow tasks in the correct order for a typical ML model deployment pipeline:
A4,2,1,3
B4,1,2,3
C1,4,2,3
D2,4,1,3
Attempts:
2 left
💡 Hint
Think about the logical flow from raw data to deployment.
Troubleshoot
advanced
2:30remaining
Diagnosing Airflow task failure due to missing dependencies
An Airflow task in your ML pipeline fails with the error: TaskInstance failed because upstream task did not complete. What is the most likely cause?
AThe Airflow scheduler is down and not triggering tasks
BThe task code has a syntax error causing immediate failure
CThe upstream task did not run or failed, so this task cannot start
DThe DAG file is missing from the dags folder
Attempts:
2 left
💡 Hint
Check the status of tasks that run before the failing one.
Best Practice
expert
3:00remaining
Best practice for managing ML model versioning in Airflow
Which approach is best for managing multiple versions of ML models in an Airflow orchestration pipeline?
AStore model versions in a version control system and use Airflow variables to select the version
BOverwrite the same model file in storage every time a new model is trained
CKeep all models in a single folder without versioning and rely on timestamps
DManually rename model files after deployment without tracking in Airflow
Attempts:
2 left
💡 Hint
Think about reproducibility and traceability in ML workflows.