Sub topic 2
The Machine Learning Lifecycle at a Glance
Assume you can train and evaluate a supervised model, use basic Git and command-line tools, and understand how a web service is deployed. This chapter gives you a working map of the machine learning lifecycle. Later chapters examine each practice in more detail.
A machine learning lifecycle is the repeating sequence of work that turns a business problem into a monitored model and then improves that model over time. It includes ordinary software work, but it also manages changing data, experiments, model versions, and uncertain predictions.
The lifecycle loop
The lifecycle usually follows these stages:
- Frame the problem and choose measurable success criteria.
- Collect, validate, and version the data.
- Create features, which are input values used by a model.
- Train models and track experiments.
- Evaluate a candidate against technical and business requirements.
- Register an approved model version.
- Deploy the model for batch or online predictions.
- Monitor quality, data, system behavior, and business outcomes.
- Investigate failures and retrain when evidence justifies it.
The sequence is not strictly linear. Monitoring can reveal a data problem, a weak success metric, or a need to redesign features. A new business requirement can send the team back to problem framing.
Stages and artifacts
An artifact is a saved output that another person or system can inspect or use. Each stage should produce artifacts with clear ownership and version information.
| Stage | Main question | Typical artifact |
|---|---|---|
| Problem framing | What decision will the model support? | Metric definition and acceptance criteria |
| Data management | Are the inputs valid and traceable? | Versioned dataset and validation report |
| Feature engineering | Which inputs represent the problem? | Feature code and feature specification |
| Training | Which configuration produced this result? | Run record, parameters, metrics, and model file |
| Evaluation | Is this candidate safe and useful? | Evaluation report and release decision |
| Deployment | How will predictions reach users or systems? | Serving package or batch job |
| Monitoring | Does the deployed system still work? | Dashboards, alerts, and drift reports |
A practical handoff
Suppose a team predicts whether a payment needs review. The problem owner defines an acceptable false-negative rate. The data pipeline creates a versioned training set. The training job records its code revision, feature version, parameters, and test results. Evaluation compares the candidate with the production model. If the candidate passes, the registry stores it as an approved version. Deployment then exposes it to a limited audience or runs it in a batch process.
At every handoff, ask:
- Which version of the data produced this result?
- Which code and environment produced it?
- What evidence allowed the model to move forward?
- Who can stop, roll back, or replace it?
Exercise
A deployed model's accuracy falls after a change in customer behavior. Which lifecycle stages should you revisit first, and why?
Show answer
Start with monitoring to confirm the change and data management to inspect the incoming data. Then revisit evaluation and retraining if the change is real and the model no longer meets its release criteria.