Courseiva
easyMultiple Choice

PDE Practice Question: A team has trained a scikit-learn model and wants…

A team has trained a scikit-learn model and wants to deploy it to AI Platform Prediction for online predictions. What is the required format for the model artifact?

⚠ Common exam trap

Candidates often mistakenly believe that a single universal model file format (e.g., .h5 or SavedModel) works for all frameworks on Vertex AI, but each framework has its own required format. For scikit-learn, it must be a .joblib or .pkl file.

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

✓

A model.joblib file (or model.pkl) along with any custom code.

AI Platform Prediction (now Vertex AI) supports scikit-learn models natively. The required artifact format is a serialized model file (model.joblib or model.pkl) optionally accompanied by any custom code dependencies. This is because scikit-learn models are pickled objects, and the platform deserializes them using the same Python environment specified in the runtime version.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    A model.joblib file (or model.pkl) along with any custom code.

    Why this is correct

    AI Platform Prediction requires the scikit-learn artifact serialised as model.joblib or model.pkl, optionally bundled with custom code in a tarball. This format satisfies the deployment constraint because the serving container loads that exact filename to reconstruct the estimator.

  • ✗

    A single .h5 file containing the model weights.

    Why it's wrong here

    AI Platform Prediction requires scikit-learn models saved with joblib or pickle, producing a model.joblib or model.pkl artifact, not a single .h5 file. The .h5 format stores Keras/TensorFlow weights, so it would be the right choice when deploying a Keras model rather than a scikit-learn estimator.

  • ✗

    A SavedModel directory containing the model for TensorFlow.

    Why it's wrong here

    A SavedModel directory is the required artifact for TensorFlow models on AI Platform Prediction, not scikit-learn. Scikit-learn estimators must be serialised with joblib or pickle into model.joblib or model.pkl. SavedModel would be correct if the trained model were TensorFlow rather than scikit-learn.

  • ✗

    A model.pt file for PyTorch models.

    Why it's wrong here

    A model.pt file is the PyTorch serialisation format, which AI Platform Prediction does not accept for scikit-learn models. Scikit-learn requires joblib or pickle output named model.joblib or model.pkl. The .pt artifact would be correct when deploying a PyTorch model instead.

About these practice questions

Courseiva writes every PDE question from scratch — 747 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PDE 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 PDE exam.