Leverage Arize's model monitoring to automatically trigger ML Training workflows
Integrating with Amazon EventBridge allows teams to easily create event-driven workflows that connect native AWS services with Arize's monitoring capabilities. Want to re-train your model automatically when your model's predictions drift from your model's baseline? AWS EventBridge can help you translate Arize AI's monitoring events into powerful automated workflows.
Once the integration is completed, any Arize monitor that fires can be used as a trigger to kick-start a workflow in AWS.
Arize's model monitoring capabilities can be used to auto-trigger ML pipelines within AWS. In this example, we will walk you through how to use Arize Monitors in conjunction with EventBridge to trigger AirFlow jobs to retrain your model whenever a model suffers from drift.
Navigate to your model's monitor tab, click on
new monitorand select
Fill out the custom drift monitor to match your re-training criteria (e.x. you may want to re-train your model whenever your predictions drift from your model's baseline). Make sure to name the monitor appropriately (e.x.
retrain_model) and to use your Integration Email Address (ex.
[email protected]<company>.pagerduty.com- see the PagerDuty guide for details)
Once the monitor is saved and active, you are ready to react to monitor events via EventBridge.
def lambda_handler(event, context):
# Parse the PD incident dictionary
event_detail = event['detail']
incident = event_detail['incident']
title = incident['title']
# Parse the title to determine if it is the retrain trigger monitor
should_retrain_model = 'retrain_model_trigger' in title and 'Triggered' in title
# Construct a payload to return from the handler that can be used
# by downstream workflows (AirFlow etc.)
Make sure to name your lambda appropriately so that it's easy to identify. Once complete, save and deploy the lambda in the same AWS region that you have EventBridge configured.
We now need to configure an EventBridge to utilize the lambda we created above. Navigate to EventBridge in the AWS console and configure a rule that will invoke the lambda whenever a matching event is fired. The event pattern and rule details may differ depending on your integration. (See PagerDuty docs for details.) Once completed, you should have a rule similar to the configuration below:
EventBridge rule configuration