PROFESSIONAL-MACHINE-LEARNING-ENGINEER · Question #212
You developed a Vertex AI pipeline that trains a classification model on data stored in a large BigQuery table. The pipeline has four steps, where each step is created by a Python function that uses t
The correct answer is C. Move the first step of your pipeline to a separate step, and provide a cached path to Cloud. To reduce costs associated with iterative model development, specifically in data export and preprocessing steps of a Vertex AI pipeline, these expensive initial steps should be moved to a separate process that caches its output in Cloud Storage.
Question
Exhibit
Options
- AChange the components' YAML filenames to export.yaml, preprocess,yaml, f "train-{dt}.yaml",
- BAdd the {"kubeflow.v1.caching": True} parameter to the set of params provided to your
- CMove the first step of your pipeline to a separate step, and provide a cached path to Cloud
- DChange the name of the pipeline to f"my-awesome-pipeline-{dt}".
How the community answered
(41 responses)- A7% (3)
- B15% (6)
- C76% (31)
- D2% (1)
Why each option
To reduce costs associated with iterative model development, specifically in data export and preprocessing steps of a Vertex AI pipeline, these expensive initial steps should be moved to a separate process that caches its output in Cloud Storage.
Changing YAML filenames is an organizational detail and does not inherently affect caching or reduce the computational costs of pipeline steps.
While `kubeflow.v1.caching: True` enables component caching, its effectiveness can be limited if the overall pipeline definition or pipeline run name changes frequently (e.g., due to `f"my-awesome-pipeline-{dt}"`), potentially causing cache misses.
Moving the data export and preprocessing steps to a separate, less frequent job that writes its output to Cloud Storage (a 'cached path') ensures that these expensive operations are not repeated during iterative development of the training step. The main pipeline then consumes this pre-processed data, significantly reducing costs during rapid iteration.
Changing the pipeline name with a dynamic timestamp (`f"my-awesome-pipeline-{dt}"`) would actually hinder KubeFlow Pipelines' default caching mechanism across runs, as each run would be considered a new, distinct pipeline, thereby increasing costs.
Concept tested: Optimizing MLOps pipeline costs through data reuse
Source: https://cloud.google.com/vertex-ai/docs/pipelines/caching
Topics
Community Discussion
No community discussion yet for this question.
