Courseiva

PMLE Automating and Orchestrating ML Pipelines Practice Question

A data scientist is creating a Vertex AI pipeline using the Kubeflow Pipelines SDK v2. Which TWO statements about pipeline parameters are correct? (Choose two.)

⚠ Common exam trap

The trap is that candidates often assume pipeline parameters must be JSON-serialized or limited to strings due to older Kubeflow v1 conventions, but Vertex AI's Kubeflow Pipelines SDK v2 natively supports multiple Python types and automatic serialization.

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

✓

Pipeline parameters are defined as inputs to the pipeline function decorated with @dsl.pipeline.

Option A is correct because in the Kubeflow Pipelines SDK v2, pipeline parameters are declared as typed arguments of the function decorated with @dsl.pipeline, which defines the pipeline's input interface. Option D is correct because these parameters are runtime inputs: when submitting a run (e.g., via the Vertex AI Pipelines API or the SDK's create_run_from_pipeline_func), you can supply new values that override the defaults specified in the pipeline definition. Option B is wrong because KFP v2 handles parameter serialization automatically; you do not manually JSON-serialize parameters before use. Option C is wrong because KFP v2 parameters support multiple types such as int, float, bool, str, list, and dict, not only str. Option E is wrong because parameters are intended for small scalar/structured configuration values; large datasets should be passed between components as artifacts (e.g., Dataset, Model), not as parameters.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Pipeline parameters are defined as inputs to the pipeline function decorated with @dsl.pipeline.

    Why this is correct

    Declaring parameters as typed arguments on the @dsl.pipeline-decorated function is how KFP v2 compiles them into pipeline-level inputs, letting callers pass values per run. This satisfies the requirement that parameters be defined at the pipeline level rather than hard-coded inside individual components.

  • ✗

    Pipeline parameters must be serialized to JSON before use.

    Why it's wrong here

    Kubeflow Pipelines SDK v2 accepts native Python types such as int, float, bool, list and dict directly, serialising them internally; manual JSON encoding is unnecessary. It is tempting because parameters are stored as JSON in the IR YAML, and would be correct only when constructing that IR by hand.

  • ✗

    Pipeline parameters can only be of type str.

    Why it's wrong here

    Parameters support int, float, bool, list and dict as well as str, so restricting them to strings is false. It is tempting because command-line arguments are strings, and would be correct if the question concerned passing values to a container entrypoint rather than declaring pipeline parameters.

  • ✓

    Pipeline parameters can be overridden at pipeline run time.

    Why this is correct

    Because pipeline parameters are compiled as runtime inputs rather than baked-in constants, each run can supply different values without recompiling or editing the pipeline definition. This satisfies the scenario's need to reuse one pipeline across varying datasets and configurations.

  • ✗

    Pipeline parameters can be used to pass large datasets between components.

    Why it's wrong here

    Parameters carry small scalar configuration values, not bulk data; large artefacts move between components via URI references to Cloud Storage or Artifact Registry. It is tempting because parameters do flow between components, and would be correct for passing a path or dataset identifier rather than the dataset itself.

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 →

How Courseiva writes practice questions · Editorial policy

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.