Send yourself a text when training is complete

As I’ve been working on more complex problems the amount of time spent training has also increased. So instead of continually checking back to see if training has completed I now just send myself a text/SMS automatically.

Sign up for a free Twilio account. You’ll receive a free Twilio phone number.

Install Twilio’s Python library: pip install twilio

Then call the following function whenever your training (or any other long running process) completes:

from import Client

def send_sms_complete_notification(message):
      client = Client('YOUR_ACCOUNT_SID', 'YOUR_AUTH_TOKEN')
      client.messages.create(from_='+19999999999', # your twilio phone number
                             to='+19999999999',    # your phone nuber