⚡ Free Classes and Scholarships Available for Underprivileged Students -

Developing end-to-end ML pipelines

Automating and Orchestrating ML Pipelines

Set 1
10 Questions
No time limit
Practice Mode
0%
Score
0
Correct
0
Incorrect
10
Total Questions
Back to Topics
Question 1 of 10
You are designing an ML pipeline that needs to validate incoming data before training. The pipeline should detect schema drift, check for missing values, and identify anomalies in feature distributions. Which component should you use in your TFX pipeline?
Explanation
Option C (ExampleValidator) is correct because it validates incoming data against an expected schema, detecting issues like missing values, schema drift, and anomalies in feature distributions. This is the specific TFX component designed for data validation. Option D (StatisticsGen) is incorrect because it only computes statistics from data; it doesn't perform validation or anomaly detection on its own. Option B (SchemaGen) is incorrect because it generates schemas from data rather than validating data against schemas. Option A (Transform) is incorrect because while it preprocesses data, it's not primarily designed for validation tasks like detecting schema drift or anomalies.
Question 2 of 10
Your team needs to ensure consistent feature preprocessing between training and serving. During training, features are scaled using statistics computed from the training dataset. What is the recommended approach to maintain consistency in production?
Explanation
Option D (TFX Transform) is correct because it generates a preprocessing graph that can be saved and deployed with the model, ensuring identical transformations are applied during both training and serving. The Transform component materializes preprocessing logic as a TensorFlow graph. Option B is incorrect because shared libraries still require careful synchronization and don't guarantee identical numerical operations across environments. Option C is incorrect because manual reimplementation introduces risk of inconsistencies and is error-prone. Option A is incorrect because Keras preprocessing layers can't easily incorporate training-time statistics (like mean/std from training data) computed during the training phase.
Question 3 of 10
You need to orchestrate a complex ML pipeline with conditional logic, parallel execution, and integration with multiple GCP services. The solution must minimize operational overhead and provide native integration with Vertex AI. Which orchestration framework should you choose?
Explanation
Option B (Vertex AI Pipelines) is correct because it provides serverless orchestration with native Vertex AI integration, supports conditional logic and parallel execution through Kubeflow Pipelines SDK, and minimizes operational overhead with fully managed infrastructure. Option A (Cloud Composer) is incorrect because while it supports complex workflows, it requires managing Airflow infrastructure, which increases operational overhead compared to the serverless Vertex AI Pipelines. Option D (Cloud Build) is incorrect because it's primarily designed for CI/CD workflows, not complex ML pipeline orchestration with conditional logic. Option C (Cloud Run) is incorrect because it requires custom orchestration logic and doesn't provide built-in pipeline management features.
Question 4 of 10
Your organization uses MLflow for experiment tracking and wants to deploy MLflow on Google Cloud while maintaining existing workflows. The solution needs managed infrastructure and integration with Cloud Storage. What is the most appropriate deployment approach?
Explanation
Option A (GKE with persistent volumes) is correct because it provides the managed Kubernetes infrastructure that MLflow needs while allowing integration with Cloud Storage for artifact storage and offering flexibility for scaling and customization of the MLflow deployment. Option B (Cloud Run) is incorrect because MLflow tracking server requires persistent storage and stateful connections that are not well-suited to Cloud Run's stateless, request-based model. Option C (Vertex AI Experiments) is incorrect because the requirement explicitly states maintaining existing MLflow workflows, not migrating away from MLflow. Option D (Cloud Composer) is incorrect because Composer is for workflow orchestration, not for hosting the MLflow tracking server itself.
Question 5 of 10
You need to trigger model retraining when new labeled data arrives in Cloud Storage and model performance metrics drop below a threshold. The pipeline should start within minutes of trigger conditions being met. Which combination of services provides the most efficient solution?
Explanation
Option C (Eventarc with Vertex AI Pipeline) is correct because Eventarc provides native event detection for Cloud Storage with minimal latency, directly triggering Vertex AI Pipelines which are designed for ML workflows including performance evaluation and retraining. Option A is incorrect because using Cloud Functions adds an unnecessary intermediate layer when Eventarc can directly trigger pipelines. Option B (Cloud Scheduler) is incorrect because hourly checks don't meet the requirement of triggering within minutes of events occurring. Option D is incorrect because Cloud Run jobs would require custom orchestration logic for the complete retraining pipeline, whereas Vertex AI Pipelines provides this built-in.
Question 6 of 10
Your ML pipeline processes data using Apache Beam and needs to scale automatically for varying data volumes. Training occurs on Vertex AI. The pipeline should minimize cost during low-usage periods. Which compute option is most appropriate for the data processing stage?
Explanation
Option A (Dataflow) is correct because it's the managed service specifically designed for Apache Beam pipelines, provides automatic scaling based on data volume, and charges only for resources used, minimizing costs during low-usage periods. Option C (Dataproc) is incorrect because while it can run Beam jobs, it requires cluster management and isn't optimized for Beam like Dataflow, resulting in higher operational overhead. Option D (GKE) is incorrect because it requires managing Kubernetes infrastructure and isn't specifically optimized for Beam pipelines, adding unnecessary complexity. Option B (Vertex AI custom training) is incorrect because it's designed for model training, not for data processing with Apache Beam.
Question 7 of 10
You are building a TFX pipeline that needs to validate a newly trained model before deployment. The validation should compare the new model against the current production model using held-out evaluation data. Which TFX component should you configure for this task?
Explanation
Option B (Evaluator) is correct because in current TFX versions, the Evaluator component performs model validation by comparing new model metrics against baseline models (like the current production model) on evaluation data and determining if the model meets quality thresholds. Option C (ModelValidator) is incorrect because ModelValidator was deprecated in favor of the Evaluator component for model validation tasks in recent TFX versions. Option D (Pusher) is incorrect because while it handles deployment, it relies on validation results from Evaluator rather than performing the actual model comparison itself. Option A (Trainer) is incorrect because it trains the model and may compute training metrics, but doesn't perform comparative validation against production models.
Question 8 of 10
Your company operates in multiple cloud environments and needs to run ML pipelines across GCP, AWS, and on-premises infrastructure. The solution should provide consistent pipeline definitions and portability. Which approach best meets these requirements?
Explanation
Option D (Kubeflow Pipelines on multi-cloud Kubernetes) is correct because Kubeflow is cloud-agnostic, runs on any Kubernetes cluster regardless of provider, and provides consistent pipeline definitions that are portable across environments. Option A (Vertex AI Pipelines) is incorrect because it's a GCP-native service and doesn't run natively on AWS or on-premises infrastructure, limiting true multi-cloud portability. Option C (Cloud Composer) is incorrect because it's a managed GCP service that cannot be deployed on AWS or on-premises, though it can orchestrate tasks across clouds. Option B (TFX) is incorrect because while TFX components can use different backends, the orchestration itself still requires a platform and isn't inherently multi-cloud portable.
Question 9 of 10
You need to implement automated model retraining that triggers when prediction accuracy drops below 85% over a 7-day period. The monitoring system should aggregate predictions and labels, compute metrics, and trigger pipelines. Which services should you combine?
Explanation
Option C (Vertex AI Prediction logging, BigQuery ML, Cloud Functions) is correct because it provides the complete workflow: Vertex AI logs predictions, BigQuery ML computes custom accuracy metrics over time windows, and Cloud Functions triggers retraining based on metric thresholds. Option B (Model Monitoring) is incorrect because Vertex AI Model Monitoring focuses on feature drift and skew detection, not on accuracy metrics computed from actual predictions versus labels over time. Option D (Cloud Scheduler) is incorrect because periodic checks are less efficient than event-driven triggers, and it doesn't specify how predictions and labels are collected. Option A (Cloud Logging) is incorrect because it lacks the analytics capability to compute accuracy metrics over 7-day windows efficiently.
Question 10 of 10
Your TFX pipeline includes a Transform component that performs feature engineering. You need to ensure the same transformations apply during both batch prediction and online serving via a prediction endpoint. How should you implement this?
Explanation
Option D (export transform graph in SavedModel) is correct because TFX Transform generates a TensorFlow graph that can be exported and included with the model's SavedModel, ensuring identical transformations are automatically applied during both batch and online predictions. Option C (replicate logic) is incorrect because manual replication introduces risk of inconsistencies, bugs, and maintenance overhead when transformations need to be updated. Option B (configuration file) is incorrect because complex transformations involve computation that can't be fully captured in configuration, and this approach doesn't guarantee numerical consistency. Option A (Dataflow templates) is incorrect because this only addresses batch prediction, not online serving, and adds an external preprocessing step rather than embedding transformations with the model.