OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Knock Knock

Knock Knock is a Python library that adds notifications to machine-learning training functions when they finish or crash. It uses a decorator on the function, and supports notification channels including email, Slack, Telegram, Microsoft Teams, SMS, Discord, desktop notifications, Matrix, Amazon Chime, DingTalk, RocketChat and WeChat Work.

Independent OpenViST project profile, based on linked sources.

Knock Knock — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Knock Knock when a training job runs long enough that you may not be watching its terminal, or when you want a notification if the process crashes.

Who it is for

  • Machine-learning researchers who want an alert when a long training run finishes.
  • Developers who want to be notified if a training function crashes.
  • Teams that want completion or crash notifications delivered through a supported messaging channel.

Documented uses

  • Add completion and crash alerts to a Python training function.
  • Send a training result along with a notification when the function returns a value.
  • Wrap a command-line process for notification using the documented CLI.
Before you choose

Requirements & limits

The project is an open-source Python library under the MIT license. The README documents installation with pip and says the code has only been tested with Python 3.6 or later.

  • Slack setup requires a room webhook URL; Telegram setup requires a bot token and chat ID.
  • Email notifications use Yagmail with Gmail/SMTP, and the README describes configuring account access.
  • The README lists twelve notification options, including messaging services, email, SMS and desktop notifications.
  • The library notifies around the wrapped function's completion or crash; it is not described as a training dashboard.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Add a Slack alert to a training function

Wrap a Python training function so Knock Knock can notify a Slack channel when it completes or crashes.

Before you start

  • Python 3.6 or later, as described in the README.
  • Install Knock Knock with pip.
  • A Slack room webhook URL; a channel name is shown in the example.

Steps

  1. Install the library with the command below.

    Documented command
    pip install knockknock
  2. Import slack_sender from knockknock and set the Slack webhook URL.

  3. Apply @slack_sender(webhook_url=webhook_url, channel="") above the training function.

Expected outcome

The wrapped function is configured to send a Slack notification on completion or a crash; its return value is also reported when present.

Guide limitations

  • The setup requires a Slack webhook URL. User mentions are optional and require Slack user IDs.
  • The README says the code has only been tested with Python 3.6 or later.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
huggingface/knockknock · Official homepage title · retained in its source language