0
0
MLOpsdevops~10 mins

Reproducible training pipelines 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 specify the version of the dataset for reproducibility.

MLOps
dataset = load_dataset('my_data', version='[1]')
Drag options to blanks, or click blank then click option'
A1.0.0
Bbeta
Clatest
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'latest' causes dataset to change over time, breaking reproducibility.
2fill in blank
medium

Complete the code to save the model with a fixed name for reproducibility.

MLOps
model.save('[1]')
Drag options to blanks, or click blank then click option'
Atemp_model.pkl
Bmodel_latest.pkl
Cmodel_v1.pkl
Dcheckpoint
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic or changing filenames makes it hard to reproduce results.
3fill in blank
hard

Fix the error in the command to install a specific package version for reproducibility.

MLOps
pip install tensorflow[1]
Drag options to blanks, or click blank then click option'
A>2.11.0
B==2.11.0
C~=2.11
D<2.11.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>2.11.0' installs newer versions, breaking reproducibility.
4fill in blank
hard

Fill both blanks to create a reproducible training pipeline step that logs parameters and artifacts.

MLOps
mlflow.log_param('[1]', value)
mlflow.log_artifact('[2]')
Drag options to blanks, or click blank then click option'
Alearning_rate
Bmodel.pkl
Cdataset.csv
Dbatch_size
Attempts:
3 left
💡 Hint
Common Mistakes
Logging dataset.csv as artifact instead of model file.
5fill in blank
hard

Fill all three blanks to define a reproducible pipeline step that filters data and trains a model.

MLOps
filtered_data = data[data['age'] [1] [2]]
model = train_model(filtered_data, epochs=[3])
Drag options to blanks, or click blank then click option'
A>
B30
C10
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>' changes the data subset.