0
0
MLOpsdevops~15 mins

ML lifecycle stages in MLOps - Mini Project: Build & Apply

Choose your learning style9 modes available
ML Lifecycle Stages
📖 Scenario: You are working as a junior MLOps engineer. Your team wants to document the main stages of the machine learning lifecycle in a simple Python program. This will help new team members understand the process clearly.
🎯 Goal: Create a Python dictionary that lists the main stages of the ML lifecycle with their descriptions. Then, add a variable to select a stage to focus on. Next, write code to extract the description of the selected stage. Finally, print the description to show the result.
📋 What You'll Learn
Create a dictionary called ml_lifecycle with exact keys and values for stages
Add a variable called selected_stage with the exact stage name to focus on
Write code to get the description of selected_stage from ml_lifecycle
Print the description of the selected stage exactly
💡 Why This Matters
🌍 Real World
Documenting ML lifecycle stages helps teams understand and follow the process clearly, improving collaboration and project success.
💼 Career
MLOps engineers often create tools and documentation to manage ML workflows, making this knowledge essential for clear communication and automation.
Progress0 / 4 steps
1
Create the ML lifecycle dictionary
Create a dictionary called ml_lifecycle with these exact entries: 'Data Collection' mapped to 'Gathering raw data from various sources.', 'Data Preparation' mapped to 'Cleaning and transforming data for modeling.', 'Model Training' mapped to 'Building the machine learning model.', 'Model Evaluation' mapped to 'Assessing model performance.', and 'Deployment' mapped to 'Releasing the model to production.'
MLOps
Need a hint?

Use curly braces {} to create the dictionary. Each key and value must be exactly as given.

2
Add a selected stage variable
Create a variable called selected_stage and set it to the string 'Model Training'.
MLOps
Need a hint?

Assign the exact string 'Model Training' to the variable selected_stage.

3
Get the description of the selected stage
Create a variable called stage_description and set it to the value from ml_lifecycle for the key stored in selected_stage.
MLOps
Need a hint?

Use the dictionary access syntax with the variable selected_stage as the key.

4
Print the description of the selected stage
Write a print statement to display the value of stage_description.
MLOps
Need a hint?

Use print(stage_description) to show the description.