less than 1 minute read

There is a Python library called knockknock that allows you to get a notification when your training is complete or when it crashes during the process. All it takes to get a notification is two additional lines of code.

To send an email, simply insert a decorator @email_sender() above your … function:

from knockknock import email_sender

    recipient_emails=["youremail@gmail.com"], sender_email="anotheremail@gmail.com"
def main():

To send a notification to your Slack:

from knockknock import slack_sender

def main():

Via Khuyen Tran.