Experiments

Run Alerts

Set alerts for your experiments

Run alerts are a way to notify you when certain conditions are met. You can customize the alert content yourself and we will deliver it to you via the channel of your choice, including Email, Slack, Discord and more.

We believe you should always be in the know of the status of your experiments, and alerts are one way to ensure that you always stay on top of things instead of blindly waiting for the experiment to finish.

To set up alerts, you can invoke mlop.alert(), or after initializing the run, equivalently on the run object run.alert().

mlop.alert(
    title="Hello!",
    message="Hello, world!",
    level="info",
    wait=0,
    url="https://discord.com/api/webhooks/example/url",
    remote=False,
    email=False
)
ParameterTypeDescription
title*strThe title of the alert
message*strThe message of the alert
level*strThe level of the alert
waitintThe number of seconds to wait before firing the alert
urlstrThe webhook URL for Discord or Slack
remoteboolWhether to use the mlop server to send the alert
emailboolWhether to send the alert to the email

By default, mlop supports sending the alert locally to ensure prompt delivery. However, you can also instruct the mlop server to send the alert on your behalf, if for example, direct access to Discord or Slack is blocked, or you would rather protect your privacy.

Setting remote=True will instruct the mlop server the content of the alert, which will then send it through the appropriate channel.

Email Alerts

Email alerts will currently only work when you set remote=True. Sending email alerts locally from the logger via SMTP is only available for internal users at this time.

Receipients of the alerts will be members of your organization. This can be adjusted to your own account email.

Source

See the Python code for more details.