0
0
MLOpsdevops~20 mins

Reproducible training pipelines in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Reproducible Pipeline Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Key principle of reproducible training pipelines

Which of the following is the most important principle to ensure a machine learning training pipeline is reproducible?

AUsing fixed random seeds and versioning all data and code
BRunning training on the fastest available hardware
CUsing the latest deep learning framework version without version control
DAllowing manual changes to data preprocessing steps during training
Attempts:
2 left
💡 Hint

Think about what guarantees the exact same results when you run the pipeline multiple times.

💻 Command Output
intermediate
1:30remaining
Output of a pipeline run with fixed seed

Given this snippet setting a fixed random seed in Python for training, what will be the output of print(random.randint(1, 100)) if the seed is set to 42 before?

MLOps
import random
random.seed(42)
print(random.randint(1, 100))
A42
B15
C82
DError: seed must be between 0 and 1
Attempts:
2 left
💡 Hint

Python's random.seed sets the starting point for the random number generator.

Configuration
advanced
2:30remaining
Correct Dockerfile snippet for reproducible training environment

Which Dockerfile snippet best ensures a reproducible training environment by fixing package versions?

A
FROM python:3.9
RUN pip install tensorflow --upgrade
B
FROM python:3.9
RUN pip install tensorflow
C
FROM python:latest
RUN pip install tensorflow==latest
D
FROM python:3.9
RUN pip install tensorflow==2.12.0
Attempts:
2 left
💡 Hint

Fixing package versions avoids unexpected changes in dependencies.

🔀 Workflow
advanced
3:00remaining
Order of steps in a reproducible training pipeline

What is the correct order of these steps in a reproducible ML training pipeline?

A1,2,3,4
B1,3,2,4
C2,1,3,4
D3,1,2,4
Attempts:
2 left
💡 Hint

Think about what must be done before training starts and what should be logged during the process.

Troubleshoot
expert
3:00remaining
Cause of non-reproducible training results despite fixed seeds

You set fixed random seeds in your training pipeline, but results differ each run. Which is the most likely cause?

ARunning training on the same hardware
BUsing non-deterministic GPU operations or multi-threading without control
CSaving model checkpoints after training
DNot updating the training data between runs
Attempts:
2 left
💡 Hint

Some hardware or library operations can introduce randomness even if seeds are fixed.