Reducing ML Training Costs with Preemptible VMs and Checkpoints
Short answer
C Migrate to training with Kubeflow on Google Kubernetes Engine, and use preemptible VMs with checkpoints.
Question
Key Takeaways
The main trap is ignoring the short lifetime of preemptible VMs; without checkpoints, long training jobs will fail repeatedly, negating cost benefits.
Learn how to reduce Google Cloud ML training costs by using Kubeflow on GKE with preemptible VMs and checkpoints to handle long-running model iterations.
Common mistake: Choosing Option A because it mentions checkpoints but fails to utilize Preemptible/Spot VMs, which are the primary source of cost reduction for long-running jobs.
Expert Analysis
The scenario involves training large-scale models that take weeks or months to complete. The primary objective is to reduce Google Cloud compute costs without impacting performance.
Preemptible VMs (now known as Spot VMs) offer significant cost savings compared to standard on-demand VMs. However, they can be terminated by the cloud provider with little notice, typically after a maximum lifetime of 24 hours. This makes them unsuitable for long-running jobs unless the job is resilient to interruptions.
To use Preemptible/Spot VMs effectively for long training runs, you must implement checkpointing. Checkpointing saves the model's state at regular intervals. If a VM is preempted, the training job can resume from the last saved checkpoint rather than starting over. This ensures that the investment in compute time is not lost and the overall training duration remains manageable despite interruptions.
Option A suggests using AI Platform with checkpoints but does not mention Preemptible VMs, missing the key cost-saving mechanism of spot pricing. Option B lacks both checkpointing and spot pricing. Option D uses Preemptible VMs but lacks checkpointing, which would result in frequent restarts and potentially longer total training times due to wasted work, thus impacting efficiency if not managed carefully, though technically it might still finish. However, the combination in C is the industry best practice for this specific constraint: migrating to a flexible orchestration platform like Kubeflow on GKE allows for better management of distributed training across spot instances, and using Preemptible VMs with checkpoints is the definitive strategy for reducing costs while maintaining progress integrity.
Therefore, migrating to Kubeflow on GKE and utilizing Preemptible VMs with checkpoints (Option C) is the correct approach to minimize costs while ensuring the model training completes successfully without data loss.
Official Reference
- https://cloud.google.com/blog/products/ai-machine-learning/reduce-the-costs-of-ml-workflows-with-preemptible-vms-and-gpus?hl=en
- https://www.kubeflow.org/docs/distributions/gke/pipelines/preemptible/
- https://cloud.google.com/optimization/docs/guide/checkpointing
These links open the official vendor documentation in a new tab.
Exam Strategy
When faced with 'reduce cost' questions involving long-duration tasks, look for 'Preemptible' or 'Spot' instances combined with 'Checkpointing'. Always verify if the solution addresses the interruption risk inherent in spot pricing. If a question implies stability is key, ensure the mechanism for resuming interrupted jobs is explicitly stated.
Frequently Asked Questions
Why are checkpoints necessary when using Preemptible VMs?
Can I use Preemptible VMs for any length of training job?
What is the benefit of using Kubeflow on GKE for this scenario?
Community Votes
77% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 20 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 20
-
seifou 👍 11 Answered Chttps://cloud.google.com/blog/products/ai-machine-learning/reduce-the-costs-of-ml-workflows-with-preemptible-vms-and-gpus?hl=en
-
MultiCloudIronMan 👍 5 Answered CPre-emptive VMs are cheaper and checkpoints will enable termination if the result is acceptable
-
joaquinmenendez 👍 4C is the best approach because it allows you to reduce your compute costs without impacting the model's performance. Preemptible VMs are much cheaper than standard VMs, but they can be terminated at any time. By using checkpoints, you can ensure that your training job can be resumed if a preemptible VM is terminated. Also, even if training takes days, the checkpoints will prevent lossing the progress if preemtible VM are down.
-
hiromi 👍 4 Answered CIt's seem C - https://www.kubeflow.org/docs/distributions/gke/pipelines/preemptible/ - https://cloud.google.com/optimization/docs/guide/checkpointing
-
ares81 👍 3"A Preemptible VM (PVM) is a Google Compute Engine (GCE) virtual machine (VM) instance that can be purchased for a steep discount as long as the customer accepts that the instance will terminate after 24 hours." This excludes C and D. Checkpoints are needed for long processing, so A.
Show 15 more comments
-
neochaotic 👍 3 Answered CC - Reduce cost with preemptive instances and add checkpoints to snapshot intermediate results
-
_learner_ 👍 2 Answered Apreemtible vm are valid for 24hrs. Hence training needs months to complete which is mentioned in question that makes A is answer.
-
LearnSodas 👍 2 Answered ASaving checkpoints avoids re-run from scratch
-
Liting 👍 2 Answered COptimize cost then should use kubeflow
-
ares81 👍 2 Answered AIt's A.
-
taylz876 👍 1 Answered CThe team trains large models on GPUs, and each iteration takes weeks or months. That's a lot of compute time, so the biggest saving is to use preemptible VMs, which are much cheaper. The catch is that Google can reclaim them at any time, which would otherwise lose days of work. Checkpoints solve that by saving progress regularly, so an interrupted job resumes from the last checkpoint instead of starting over. That gives you the savings without hurting the model's performance. The question asks for Kubeflow on GKE because at that time AI Platform Training didn't offer preemptible VMs. Current names: preemptible VMs are now Spot VMs. Today you can also use Spot VMs in Agent Platform custom training, so you wouldn't need to move to GKE.
-
tavva_prudhvi 👍 1I think it’s a. By using distributed training jobs with checkpoints, you can train your models on multiple GPUs simultaneously, which reduces the training time. Checkpoints allow you to save the progress of your training jobs regularly, so if the training job gets interrupted or fails, you can restart it from the last checkpoint instead of starting from scratch. This saves time and resources, which reduces costs. Additionally, AI Platform's autoscaling feature can automatically adjust the number of resources used based on the workload, further optimizing costs.
-
CloudKida 👍 1 Answered Chttps://cloud.google.com/ai-platform/prediction/docs/ai-explanations/overview AI Explanations helps you understand your model's outputs for classification and regression tasks. Whenever you request a prediction on AI Platform, AI Explanations tells you how much each feature in the data contributed to the predicted result. You can then use this information to verify that the model is behaving as expected, recognize bias in your models, and get ideas for ways to improve your model and your training data.
-
tavva_prudhvi 👍 1Additionally, AI Platform's autoscaling feature can automatically adjust the number of resources used based on the workload, further optimizing costs.
-
John_Pongthorn 👍 1C is out of date ? AI Platform is Vertex-AI ,so , this is a simple scenario that would accommodate infrastructure for this case.
-
YangG 👍 1I think it should be A https://cloud.google.com/ai-platform/training/docs/overview
-
libo1985 👍 1I guess distributed training is not cheap. So C.
-
PhilipKoku 👍 1 Answered CC) Preemptible VMs with Check points
-
M25 👍 1 Answered CWent with C
-
sashimii14 👍 1 Answered CC for me
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →