0
0
MLOpsdevops~10 mins

ML lifecycle stages in MLOps - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - ML lifecycle stages
Data Collection
Data Preparation
Model Training
Model Evaluation
Model Deployment
Monitoring & Maintenance
Back to Data Collection (if needed)
The ML lifecycle moves step-by-step from gathering data to preparing it, training a model, checking its quality, deploying it, and then monitoring it for improvements.
Execution Sample
MLOps
Stage = 'Data Collection'
if Stage == 'Data Collection':
    Stage = 'Data Preparation'
# ... continues through stages
This code simulates moving through the ML lifecycle stages one by one.
Process Table
StepCurrent StageActionNext Stage
1Data CollectionCollect raw data from sourcesData Preparation
2Data PreparationClean and format dataModel Training
3Model TrainingTrain model on prepared dataModel Evaluation
4Model EvaluationTest model accuracy and performanceModel Deployment
5Model DeploymentDeploy model to productionMonitoring & Maintenance
6Monitoring & MaintenanceTrack model performance and updateData Collection (if needed)
7Data CollectionCycle repeats if model needs retrainingData Preparation
💡 Cycle repeats to improve model or stops if model performs well
Status Tracker
StageStartAfter Step 1After Step 2After Step 3After Step 4After Step 5After Step 6After Step 7
StageData CollectionData PreparationModel TrainingModel EvaluationModel DeploymentMonitoring & MaintenanceData CollectionData Preparation
Key Moments - 3 Insights
Why does the lifecycle return to Data Collection after Monitoring?
Because monitoring may show the model needs new or updated data, so the cycle restarts to improve the model, as seen in steps 6 and 7 of the execution_table.
Is Model Deployment the last step in the ML lifecycle?
No, after deployment, the model must be monitored and maintained to ensure it works well over time, shown in step 5 moving to step 6.
What happens during Data Preparation?
Raw data is cleaned and formatted to be usable for training, which is the action in step 2 of the execution_table.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the stage after Model Training?
AModel Deployment
BModel Evaluation
CData Preparation
DMonitoring & Maintenance
💡 Hint
Check row 3 in the execution_table under Next Stage column.
At which step does the lifecycle start monitoring the model?
AStep 6
BStep 5
CStep 4
DStep 7
💡 Hint
Look at the Current Stage column in step 6 of the execution_table.
If the model performs well, what happens to the cycle?
AIt skips Monitoring & Maintenance
BIt repeats from Data Collection
CIt stops after Model Deployment
DIt jumps directly to Model Training
💡 Hint
Refer to the exit_note explaining when the cycle stops.
Concept Snapshot
ML lifecycle stages:
1. Data Collection - gather raw data
2. Data Preparation - clean and format data
3. Model Training - build model
4. Model Evaluation - test model
5. Model Deployment - release model
6. Monitoring & Maintenance - track and update
Cycle repeats if needed to improve model
Full Transcript
The ML lifecycle starts with collecting data, then preparing it for use. Next, a model is trained on this data. After training, the model is evaluated to check its quality. If good, it is deployed to production. Then, the model is monitored to ensure it keeps working well. If monitoring shows problems or new data is available, the cycle restarts from data collection to improve the model. This cycle helps keep ML models accurate and useful over time.