Stay organized with collections
Save and categorize content based on your preferences.
With the automatic model refresh feature, when the underlying model changes, your pipeline
updates to use the new model. Because the RunInference transform automatically
updates the model handler, you don't need to redeploy the pipeline. With this
feature, you can update your model in real time, even while the Apache Beam
pipeline is running.
Automatic model refresh provides two methods for updating machine learning (ML)
models, watch mode and event mode.
Watch mode
Use one of the Apache Beam provided patterns, such as the
WatchFilePattern
class, to watch for the latest file in your Cloud Storage bucket.
WatchFilePattern uses timestamps to match a file_pattern and emits the latest
ModelMetadata,
which the RunInference PTransform uses to update your ML model.
Connect your pipeline to an unbounded source, such as
Pub/Sub, to send update events directly to the transform, which
initiates a model update. You configure a custom
side inputPCollection that defines the logic for the model update.
To follow a tutorial that demonstrates how to update your model in production by
using a side input PCollection, see
Update ML models in running pipelines.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-13 UTC."],[[["The automatic model refresh feature allows pipelines to update and use new models without redeployment when the underlying model changes."],["Watch mode utilizes file patterns, like `WatchFilePattern`, to monitor for the latest model files in cloud storage and trigger updates using timestamps."],["Event mode updates models by connecting the pipeline to an unbounded source like Pub/Sub, using a custom side input `PCollection` to define the update logic."],["Two modes exist: Watch Mode and Event Mode, providing options to keep models current in real time while the pipeline is actively running."]]],[]]