How to trigger ML pipelines only on new file uploads?
You are creating an ML pipeline for data processing, model training, and model deployment that uses different Google Cloud services. You have developed code for each individual task, and you expect a high frequency of new files. You now need to create an orchestration layer on top of these tasks. You only want this orchestration pipeline to run if new files are present in your dataset in a Cloud Storage bucket. You also want to minimize the compute node costs. What should you do?
Community Votes
80% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
The question tests the ability to choose a cost-effective
To minimize costs and trigger an ML pipeline only upon new file arrivals
Selecting Option D (Cloud Composer with GCSObjectUpdateSensor) is a common mistake because while it technically fulfills the trigger requirement
Community Discussion (9 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is correct because it utilizes a serverless architecture that incurs costs only when the event occurs. A Cloud Function triggered by a Cloud Storage event ensures the pipeline runs exactly when a new file is uploaded. Deploying a Vertex AI Pipeline from this function avoids the need for a persistent orchestration environment, significantly reducing compute node costs compared to solutions like Cloud Composer.Why the Other Options Are Wrong
Option A is incorrect because the Scheduler API runs on a fixed schedule (polling), potentially executing the pipeline even when no new files exist, wasting resources. Option B is incorrect because Cloud Composer runs on GKE clusters that incur costs continuously regardless of pipeline activity. Option D is incorrect for the same cost reason; while GCSObjectUpdateSensor is effective for triggering, the underlying Cloud Composer environment requires expensive, always-on compute nodes.Community Comment Notes
The community strongly supports Option C, highlighting the cost benefits of serverless components. Comment [3] explicitly notes that Cloud Composer incurs costs whereas Option C is serverless. Comments [1] and [2] reinforce that the event-driven model of Cloud Functions meets the requirement to run only when new files are present. While some users favored Option D for its sensor capabilities, the majority agreed that the cost constraint eliminates Cloud Composer as a viable choice.Official Reference
Exam Strategy
When questions emphasize minimizing compute costs or "only run when X happens," look for serverless, event-driven solutions (like Cloud Functions) rather than managed clusters (like Cloud Composer or Dataproc), which have baseline costs regardless of activity.
Related Analysis
Practice All PMLE Questions
Access 65 questions with complete answers and detailed explanations.
View Full PMLE Practice Test →