0
0
MLOpsdevops~10 mins

Why reproducibility builds trust in ML in MLOps - Test Your Understanding

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

Complete the code to save the model with reproducible results.

MLOps
model.save('model_[1].h5')
Drag options to blanks, or click blank then click option'
Av1
Btemp
Cfinal
Dtest
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic names like 'temp' or 'test' which don't track versions.
2fill in blank
medium

Complete the code to set a fixed random seed for reproducibility.

MLOps
import numpy as np
np.random.seed([1])
Drag options to blanks, or click blank then click option'
ANone
Brandom
C42
D-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using None or 'random' which do not fix the seed.
3fill in blank
hard

Fix the error in the code to log parameters for reproducibility.

MLOps
mlflow.log_param('learning_rate', [1])
Drag options to blanks, or click blank then click option'
A0.01
B'0.01'
Clearning_rate
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the learning rate as a string or variable name instead of a number.
4fill in blank
hard

Fill both blanks to create a reproducible data split.

MLOps
train_data, test_data = train_test_split(data, test_size=[1], random_state=[2])
Drag options to blanks, or click blank then click option'
A0.2
B0.5
C42
DNone
Attempts:
3 left
💡 Hint
Common Mistakes
Using None for random_state or incorrect test sizes.
5fill in blank
hard

Fill all three blanks to log model metrics reproducibly.

MLOps
mlflow.log_metric('[1]', [2], step=[3])
Drag options to blanks, or click blank then click option'
Aaccuracy
B0.95
C1
Dloss
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing metric names and values or missing the step parameter.