0
0
MLOpsdevops~30 mins

Model approval workflows in MLOps - Mini Project: Build & Apply

Choose your learning style9 modes available
Model Approval Workflows
📖 Scenario: You work in a team that builds machine learning models. Before a model is used in production, it must be approved based on its performance metrics. This project helps you create a simple approval workflow to decide if a model passes or needs review.
🎯 Goal: Build a small program that stores model performance scores, sets an approval threshold, checks which models meet the threshold, and prints the approved models.
📋 What You'll Learn
Create a dictionary called models with model names as keys and their accuracy scores as values
Create a variable called approval_threshold with a float value representing the minimum accuracy needed for approval
Use a dictionary comprehension to create a new dictionary approved_models containing only models with accuracy greater than or equal to approval_threshold
Print the approved_models dictionary
💡 Why This Matters
🌍 Real World
Teams building machine learning models need to approve models before using them in real applications to ensure quality and reliability.
💼 Career
Understanding model approval workflows is important for roles in MLOps, data science, and machine learning engineering to maintain production standards.
Progress0 / 4 steps
1
Create the model performance data
Create a dictionary called models with these exact entries: 'model_A': 0.82, 'model_B': 0.76, 'model_C': 0.91, 'model_D': 0.68
MLOps
Need a hint?

Use curly braces {} to create a dictionary with keys as model names and values as accuracy scores.

2
Set the approval threshold
Create a variable called approval_threshold and set it to 0.80 to represent the minimum accuracy needed for model approval
MLOps
Need a hint?

Use a simple assignment to create the approval_threshold variable.

3
Filter approved models
Use a dictionary comprehension to create a new dictionary called approved_models that contains only the models from models with accuracy greater than or equal to approval_threshold
MLOps
Need a hint?

Use {name: acc for name, acc in models.items() if acc >= approval_threshold} to filter the dictionary.

4
Display approved models
Write a print statement to display the approved_models dictionary
MLOps
Need a hint?

Use print(approved_models) to show the filtered dictionary.