0
0
MLOpsdevops~10 mins

Data drift detection basics in MLOps - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to import the library used for data drift detection.

MLOps
from evidently import [1]
Drag options to blanks, or click blank then click option'
Adashboard
Bprofile
Cmetrics
Dreport
Attempts:
3 left
💡 Hint
Common Mistakes
Importing the wrong module like 'dashboard' which is for visualization.
Using 'report' which is for generating reports, not profiles.
2fill in blank
medium

Complete the code to create a data drift profile object.

MLOps
data_drift_profile = profile.[1]()
Drag options to blanks, or click blank then click option'
ADashboard
BReport
CProfile
DAnalyzer
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Dashboard' which is for interactive visualization.
Using 'Report' which is for generating reports.
3fill in blank
hard

Fix the error in the code to run the data drift profile on reference and current data.

MLOps
data_drift_profile.[1](reference_data=ref_data, current_data=curr_data)
Drag options to blanks, or click blank then click option'
Acalculate
Bexecute
Capply
Dstart
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'run' which is a method of Report objects.
Using 'apply' which is unrelated here.
4fill in blank
hard

Fill both blanks to create a dictionary with drift metrics from the profile results.

MLOps
drift_metrics = data_drift_profile.[1]()['[2]']
Drag options to blanks, or click blank then click option'
Aas_dict
Bmetrics
Cdata_drift
Dresults
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'json' instead of 'as_dict' for the first blank, as json() returns a string.
Using 'results' instead of 'data_drift' for the second blank.
5fill in blank
hard

Fill all three blanks to check if data drift is detected and print a message.

MLOps
if drift_metrics['[1]'] [2] [3]:
    print('Data drift detected!')
else:
    print('No data drift.')
Drag options to blanks, or click blank then click option'
Adataset_drift
B==
CTrue
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' instead of '==' causing wrong condition.
Checking for 'False' instead of 'True'.