0
0
MLOpsdevops~20 mins

Data drift detection basics in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Data Drift Detection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding Data Drift
What does data drift mean in the context of machine learning models?
AA change in the input data distribution over time that can affect model performance
BA sudden failure of the model due to hardware issues
CAn increase in the size of the training dataset
DA change in the model's architecture during training
Attempts:
2 left
💡 Hint
Think about how the data the model sees might change after deployment.
💻 Command Output
intermediate
2:00remaining
Detecting Data Drift with a Python Library
Given the following Python code snippet using the alibi-detect library to detect data drift, what will be the output if the new data distribution is significantly different from the reference data?
MLOps
from alibi_detect.cd import KSDrift
import numpy as np

# Reference data: normal distribution
ref_data = np.random.normal(0, 1, 1000)

# New data: shifted mean
new_data = np.random.normal(2, 1, 1000)

cd = KSDrift(ref_data)
drift_result = cd.predict(new_data)
print(drift_result['data']['is_drift'])
ANone
BFalse
CRaises TypeError
DTrue
Attempts:
2 left
💡 Hint
KSDrift uses the Kolmogorov-Smirnov test to detect if distributions differ.
Configuration
advanced
2:30remaining
Configuring a Data Drift Monitoring Pipeline
Which of the following YAML configurations correctly sets up a data drift monitoring job that runs daily and alerts if drift is detected?
A
schedule: hourly
monitor:
  type: data_drift
  alert: false
  threshold: 0.5
B
schedule: daily
monitor:
  type: data_drift
  alert: true
  threshold: 0.05
C
schedule: daily
monitor:
  type: data_drift
  alert: yes
  threshold: 0.01
D
schedule: daily
monitor:
  type: drift_detection
  alert: true
  threshold: 0.05
Attempts:
2 left
💡 Hint
Check for correct keys and valid values for alert and threshold.
Troubleshoot
advanced
2:00remaining
Troubleshooting False Negatives in Data Drift Detection
A data drift detection system is not alerting even though the input data has clearly changed. Which of the following is the most likely cause?
AThe monitoring job is running too frequently
BThe model was retrained recently
CThe drift detection threshold is set too high, making it insensitive to changes
DThe input data format changed but the detection system ignores format
Attempts:
2 left
💡 Hint
Consider how sensitivity settings affect detection.
🔀 Workflow
expert
2:30remaining
Order of Steps in Data Drift Detection Workflow
Arrange the following steps in the correct order for a typical data drift detection workflow.
A1,2,3,4
B1,3,2,4
C2,1,3,4
D3,1,2,4
Attempts:
2 left
💡 Hint
Think about the logical flow from data collection to alerting.