Automations

This page describes automations in W&B. Create an automation to trigger workflow steps, such as automated model testing and deployment, based on an event in W&B, such as when an artifact is created or changed or a registered model is changed.

For example, an automation can post to a Slack channel when a new artifact is created, or run a webhook to trigger automated testing when a model has the test label applied.

Overview

An automation can run when a specific event occurs in a registry or project.

For an artifact in Registry, you can configure an automation to run:

  • When a new artifact is linked to a collection. For example, trigger testing and validation workflows for new models.
  • When an alias is added to a new version of an artifact. For example, trigger a deployment workflow when the deploy alias is added to a model version.

For an artifact in a project, you can configure an automation to run:

  • When a new version of an artifact is created. For example, start a training job when a new version of a dataset artifact is created.
  • When a new artifact is linked to a project or collection. For example, trigger testing and validation workflows for new models.
  • When an alias is added to a new version of an artifact. For example, trigger a deployment workflow when the deploy alias is added to a model version.
  • When a metric for a run or set of runs meets or exceeds a configured threshold.
  • When a metric for a run or set of runs changes by a configured threshold.

For more details, refer to Automation events.

To create an automation, you:

  1. If required, configure secrets for sensitive strings the automation requires, such as access tokens, passwords, or sensitive configuration details.
  2. Authorize W&B to post to Slack or run the webhook on your behalf. This is required once per Slack channel or webhook.
  3. In the project or registry, create the automation:
  4. Grant it access to any secrets you created for it.
  5. Define the event to watch for, such as when a new artifact or version is created or linked, or when a run metric changes by a configured threshold..
  6. Define the action to take when the event occurs (posting to a Slack channel or running a webhook) and the payload to send.

Next steps