Skip to content

MLflow Webhook

laktory.models.resources.databricks.MLflowWebhook ¤

Bases: MlflowWebhookBase

MLflow Webhook

Examples:

import io

from laktory import models

webhook_yaml = '''
events:
- TRANSITION_REQUEST_CREATED
description: Databricks Job webhook trigger
status: ACTIVE
job_spec:
  job_id: some_id
  workspace_url: https://adb-1234567890.azuredatabricks.net
  access_token: some_token
'''
webhook = models.resources.databricks.MLflowWebhook.model_validate_yaml(
    io.StringIO(webhook_yaml)
)
References
BASE DESCRIPTION
description

Optional description of the MLflow webhook

TYPE: str | None | VariableType DEFAULT: None

events

The list of events that will trigger execution of Databricks job or POSTing to an URL, for example, MODEL_VERSION_CREATED, MODEL_VERSION_TRANSITIONED_STAGE, TRANSITION_REQUEST_CREATED, etc. Refer to the Webhooks API documentation for a full list of supported events

TYPE: list[str] | VariableType

http_url_spec

TYPE: MlflowWebhookHttpUrlSpec | None | VariableType DEFAULT: None

job_spec

TYPE: MlflowWebhookJobSpec | None | VariableType DEFAULT: None

model_name

Name of MLflow model for which webhook will be created. If the model name is not specified, a registry-wide webhook is created that listens for the specified events across all versions of all registered models

TYPE: str | None | VariableType DEFAULT: None

status

Optional status of webhook. Possible values are ACTIVE, TEST_MODE, DISABLED. Default is ACTIVE

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.mlflowwebhook.MlflowWebhookHttpUrlSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
authorization

Value of the authorization header that should be sent in the request sent by the wehbook. It should be of the form <auth type> <credentials>, e.g. Bearer <access_token>. If set to an empty string, no authorization header will be included in the request

TYPE: str | None | VariableType DEFAULT: None

enable_ssl_verification

Enable/disable SSL certificate validation. Default is true. For self-signed certificates, this field must be false AND the destination server must disable certificate validation as well. For security purposes, it is encouraged to perform secret validation with the HMAC-encoded portion of the payload and acknowledge the risk associated with disabling hostname validation whereby it becomes more likely that requests can be maliciously routed to an unintended host

TYPE: bool | None | VariableType DEFAULT: None

secret

Shared secret required for HMAC encoding payload. The HMAC-encoded payload will be sent in the header as X-Databricks-Signature: encoded_payload

TYPE: str | None | VariableType DEFAULT: None

url

External HTTPS URL called on event trigger (by using a POST request). Structure of payload depends on the event type, refer to documentation for more details

TYPE: str | VariableType


laktory.models.resources.databricks.mlflowwebhook.MlflowWebhookJobSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
access_token

The personal access token used to authorize webhook's job runs

TYPE: str | VariableType

job_id

ID of the Databricks job that the webhook runs

TYPE: str | VariableType

workspace_url

URL of the workspace containing the job that this webhook runs. If not specified, the job’s workspace URL is assumed to be the same as the workspace where the webhook is created

TYPE: str | None | VariableType DEFAULT: None