0
0
MLOpsdevops~20 mins

Cost optimization at scale in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Cost Optimization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Spot Instances for Cost Savings

Which statement best describes the main advantage of using spot instances in cloud-based machine learning workflows?

ASpot instances offer lower prices but can be interrupted, making them suitable for fault-tolerant batch training jobs.
BSpot instances provide guaranteed uptime and are ideal for critical real-time inference tasks.
CSpot instances are more expensive but provide better GPU performance than on-demand instances.
DSpot instances automatically scale the number of CPUs based on workload without user intervention.
Attempts:
2 left
💡 Hint

Think about cost versus reliability trade-offs in cloud compute options.

💻 Command Output
intermediate
2:00remaining
Analyzing Cost with Kubectl Metrics

Given the command kubectl top pods --namespace=ml-training, what output will you see?

MLOps
kubectl top pods --namespace=ml-training
AA list of pods with their CPU and memory usage in the ml-training namespace.
BA list of all namespaces with their total CPU and memory usage.
CAn error stating 'metrics API not available' if metrics-server is not installed.
DA list of nodes with their CPU and memory usage.
Attempts:
2 left
💡 Hint

Consider what 'top pods' command shows in Kubernetes.

🔀 Workflow
advanced
2:00remaining
Optimizing Model Training with Autoscaling

You want to reduce costs by automatically scaling your training cluster based on GPU usage. Which Kubernetes resource should you configure?

AConfigure a Cluster Autoscaler to add or remove nodes based on GPU resource requests.
BConfigure a Vertical Pod Autoscaler (VPA) to increase pod memory limits automatically.
CConfigure a Horizontal Pod Autoscaler (HPA) targeting CPU usage metrics only.
DConfigure a DaemonSet to run GPU monitoring agents on each node.
Attempts:
2 left
💡 Hint

Think about scaling nodes, not just pods, when GPU resources are involved.

Troubleshoot
advanced
2:00remaining
Identifying Cost Spikes in MLOps Pipelines

Your cloud bill suddenly increased after deploying a new ML pipeline. Which tool can help you identify which pipeline step caused the cost spike?

AUse Docker logs to check container output for errors.
BUse Prometheus to monitor CPU and memory usage metrics during pipeline execution.
CUse Git to track changes in pipeline code that might increase costs.
DUse a cloud provider's cost explorer to analyze spending by resource tags assigned to pipeline steps.
Attempts:
2 left
💡 Hint

Think about tools that analyze spending by resource usage or tags.

Best Practice
expert
2:00remaining
Implementing Cost Controls in MLOps

Which practice best helps prevent unexpected high costs in a large-scale MLOps environment?

AAllow unrestricted access to cloud resources for all team members to speed up development.
BSet up budget alerts and enforce resource quotas per team or project.
CDisable autoscaling to keep resource usage constant and predictable.
DUse only on-demand instances to avoid interruptions.
Attempts:
2 left
💡 Hint

Think about proactive cost management and limits.