Reducing Vertex AI Pipeline Costs by Decoupling Data Export
Short answer
C Move the first step of your pipeline to a separate step, and provide a cached path to Cloud Storage as an input to the main pipeline.
Question

You launch your Vertex AI pipeline as the following:

You perform many model iterations by adjusting the code and parameters of the training step. You observe high costs associated with the development, particularly the data export and preprocessing steps. You need to reduce model development costs. What should you do?
Key Takeaways
The trap is using KFP v1 caching parameters on a v2 pipeline; the real solution is architectural decoupling to avoid redundant BigQuery exports.
Learn how to reduce model development costs in Vertex AI pipelines by decoupling expensive data export steps from iterative training loops using Cloud Storage caching.
Common mistake: Choosing Option B because it mentions 'caching', but failing to notice that `kubeflow.v1.caching` is incompatible with the KubeFlow v2 API specified in the question.
Expert Analysis
The core challenge here is optimizing a Vertex AI pipeline built with the KubeFlow v2 API to reduce costs during iterative model development. The question highlights that the data export and preprocessing steps are particularly expensive.
Let's analyze why the most attractive wrong answers fail:
Option B (Add caching parameter): This is a strong distractor because caching reduces cost. However, the comment section correctly identifies a critical technical constraint: kubeflow.v1.caching is specific to KFP v1. The question explicitly states the pipeline uses the KubeFlow v2 API. In KFP v2, caching is handled differently (often via the @component decorator or pipeline job settings in Vertex AI), and using a v1-specific parameter would likely cause an error or be ignored. Furthermore, even if caching were enabled, it doesn't solve the issue of re-exporting* data from BigQuery if the input signature changes or if the cache is invalidated by dynamic names.
Option A (Change YAML filenames): This option suggests removing timestamps (-dt) from filenames to enable caching. While stable filenames help with caching, simply renaming files doesn't address the root cause: the pipeline is re-running the export from BigQuery. Even with caching, if the pipeline structure forces a re-execution of the export step due to how inputs/outputs are defined, or if the cache isn't properly leveraged for the data artifact*, you still pay for the BigQuery read/export. More importantly, Option C offers a structural optimization that bypasses this step entirely for iterations.
- Why Option C is correct: Moving the first step (data export/preprocessing) to a separate pipeline or decoupling it allows you to run this expensive operation once. You store the result in Cloud Storage. Subsequent iterations of the model training only need to read from Cloud Storage, which is cheap and fast. This avoids the recurring cost of querying and exporting large datasets from BigQuery for every single model iteration. This architectural change directly targets the identified cost driver (data export) and enables efficient iteration.
Therefore, decoupling the static data preparation from the iterative training loop is the most effective way to reduce costs.
Exam Strategy
Always verify the API version mentioned in the question (e.g., KFP v1 vs. v2). Many exam questions test compatibility between features and versions. If a feature is version-specific (like v1 caching), it cannot be used in a v2 pipeline regardless of its conceptual appropriateness. Look for architectural solutions that eliminate redundant expensive operations rather than just enabling features.
Frequently Asked Questions
Why can't I use kubeflow.v1.caching in a KFP v2 pipeline?
kubeflow.v1.caching module is specific to the older v1 framework. In KFP v2, caching is managed through different mechanisms, often integrated into the component definition or pipeline job configuration within Vertex AI.Does changing file names enable caching?
Community Votes
43% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 16 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 16
Show 11 more comments
-
shadz10 👍 2 Answered CNot A - Changing file names does not help with reducing costs Not B - you cannot directly use kubeflow.v1.caching on a pipeline that uses the KubeFlow v2 API. Version Incompatibility: The kubeflow.v1.caching module is specifically designed for KubeFlow Pipelines v1, and its structure and functionality are not directly compatible with KubeFlow Pipelines v2. so best option here is C
-
BlehMaks 👍 2 Answered Ai think it's A. 1)if we want to use the same results several times we shouldn't rename them. so we need to delete {dt} from the first two components names. 2)we already have this option enable_caching = True, why do we need kubeflow.v1.caching then? 3)i'm not sure but may be it does metter
-
Foxy2021 👍 1I select B. A: Changing the YAML filenames does not affect caching behavior or cost reduction. The pipeline's efficiency and cost effectiveness are primarily governed by how it handles inputs and outputs rather than the filenames of the components. C: Moving the first step to a separate pipeline may help with organization but doesn’t directly address the cost incurred by repeated data exports and preprocessing. Also, simply providing a cached path does not guarantee that the preprocessing step itself won’t be executed multiple times. D: Changing the name of the pipeline to include a timestamp or other identifier does not influence caching or resource usage. It merely alters the identification of the pipeline runs without any impact on the efficiency of the operations being performed.
-
lance_yu 👍 1 Answered CThe most cost-effective approach is to decouple the stable data-preparation stages from the iterative model-training stages: Run export (and potentially preprocessing) once. Store the resulting dataset in Cloud Storage. Use that stored artifact as an input to the training pipeline. During model iteration, only train and calibrate need to run. This avoids repeatedly scanning and exporting the large BigQuery table, which is the primary source of cost.
-
Sivaram06 👍 1 Answered BAdding caching to your pipeline by setting the parameter {"kubeflow.v1.caching": True} is the most efficient and effective approach to reduce model development costs, particularly for steps like data export and preprocessing, which are often time-consuming and costly to repeat during multiple iterations. This will help you avoid unnecessary re-computation and save on resource usage.
-
b1a8fae 👍 1 Answered CI considered B but a search of "kubeflow.v1.caching" on Google only produces 1 result, which is this very question on this very website. Thus, I rule it out as non-existent (please share a resource if there is any that proves it exists) and opt for C.
-
HaroonRaizada01 👍 1 Answered BUse Option B (
{"kubeflow.v1.caching": True}) to enable caching in your Vertex AI pipeline. This is the most efficient and cost-effective way to avoid redundant executions of expensive steps like data export and preprocessing. -
Foxy2021 👍 1I select C: By leveraging a Dataproc cluster, you can maintain compatibility with your existing PySpark jobs, minimize management overhead, and create a scalable proof of concept quickly and efficiently.
-
BlehMaks 👍 13)i'm not sure but may be it does matter that KubeFlow v2 API and kubeflow.v1.caching have different versions (v1 and v2)
-
Yan_X 👍 1 Answered CC Caching should be enabled for all steps, e.g., export, preprocessing and training.
-
gscharly 👍 1 Answered Asee guilhermebutzke
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 →
-dt), suggesting that by removing this timestamp, the pipeline steps might not rerun as expected. Option C could be an approach, but it would require more effort to implement (since Kubeflow handles it automatically). Additionally, the beginning of the option only mentions moving the first step, which is the export, and doesn't say anything about preprocessing (which could be one of the more expensive steps). So, considering all of these factors, I think A is the best choice."