PMLE Scaling Prototypes into ML Models Practice Question
A team is scaling a prototype ML model to production on Vertex AI. The model was developed using scikit-learn and requires custom preprocessing. They want to minimize operational overhead and ensure consistency between training and serving. Which approach should they use?
⚠ Common exam trap
Watch out — candidates often assume a pre-built container cannot handle custom preprocessing, leading them to choose a custom container (Option C) or a simpler import (Option D), but Vertex AI allows embedding preprocessing in the training package or model artifact to maintain consistency with minimal overhead.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use a pre-built Vertex AI container for scikit-learn and provide a custom training Python package with preprocessing code included.
Using a pre-built Vertex AI container for scikit-learn with a custom training Python package ensures that the same preprocessing code runs during both training and serving, minimizing operational overhead. This approach leverages Vertex AI's managed infrastructure to handle scaling, monitoring, and consistency without requiring custom container maintenance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Train on a local machine and upload the model artifacts to Cloud Storage, then create an endpoint with a pre-built container.
Why it's wrong here
Uploading artefacts to Cloud Storage with a pre-built container cannot execute the scikit-learn custom preprocessing, so training and serving pipelines diverge. It appeals because pre-built containers remove image maintenance, and that approach suits frameworks already supported by a Vertex AI pre-built container with no bespoke preprocessing code.
- ✓
Use a pre-built Vertex AI container for scikit-learn and provide a custom training Python package with preprocessing code included.
Why this is correct
Packaging preprocessing inside a custom training Python package lets Vertex AI's pre-built scikit-learn container run both training and prediction, so the same code executes at serving time. This satisfies the consistency constraint directly, while the managed container removes the operational overhead of building and maintaining your own image.
- ✗
Deploy the model as a custom prediction routine on Vertex AI Endpoints with a custom container.
Why it's wrong here
A custom container on Vertex AI Endpoints still requires the team to build, patch and host the serving image themselves, adding the operational overhead the scenario asks them to minimise. Custom containers suit bespoke runtimes or dependencies that Vertex AI pre-built containers genuinely cannot support.
- ✗
Export the model as a .pkl file and use Vertex AI's 'Import Model' with a default container for inference.
Why it's wrong here
A default container cannot run the bespoke preprocessing the model depends on, so inference would receive untransformed features and diverge from training. Import Model with a default container is tempting because it avoids building and maintaining an image, and would be right for a framework whose serving signature a pre-built container already handles.
Go deeper
Related to this question
About these practice questions
One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.