Machine Learning Engineer interview question
How do you build a reproducible ML pipeline?
Version code, data snapshot, features, parameters, environment and random seeds; run transformations as deterministic pipeline steps, record lineage and metrics, and promote immutable artifacts rather than retraining during deployment.
Direct answer
What a strong answer covers
How it works
Reproducibility means a run recorded six months ago can be rebuilt and yield the same artifacts. That requires pinning everything that influenced it: the code commit, an immutable snapshot or versioned query of the data, feature definitions, hyperparameters, random seeds, the container image with exact dependency versions, and the hardware assumptions where numerics differ. The pipeline is expressed as deterministic steps with declared inputs and outputs, an experiment tracker records parameters, metrics, and artifact hashes per run, and deployment promotes a stored artifact rather than retraining, so what was evaluated is what ships.
Example
Each training run is a DVC pipeline triggered in CI: the data stage pins a Delta Lake table version, the train stage runs in a tagged Docker image with seeds fixed, MLflow logs parameters, metrics, and the model hash, and the registry entry links back to the run. When a regulator asked how a decision was made a year earlier, the team rebuilt the model from the run and matched the artifact hash.
Common mistakes
- Training from a live database table that changes underneath.
- Retraining at deploy time and shipping a model nobody evaluated.
- Recording metrics without the code and data versions that produced them.
A useful answer structure
Answer from your own work.
Do not memorise a script: use only examples you can explain honestly in follow-up questions.
Open the desktop workspace and rehearse a clear answer in your own words.