I’ve been using this for a long time for a lot of things, but it is especially handy with machine learning. I showed this to a friend of mine also taking the course and he seems to like it a lot so I figured I would share it.
I use a service called Pushover, it is a one -time purchase for unlimited push notifications. You pay per platform, $4.99 for all your iOS devices, $4.99 for all your Android devices or $4.99 for all your Desktops, so if you want to use all three it is $15 one-time fee. There are a lot of these services (like Boxcar and so on) but PushOver is by far the easiest, most functional and extremely cheap.
Why is this great?
The API is fantastic and simple. Literally, can be up and running with a new app inside of 5 minutes. Less if you put your coffee down.
Why do I care?
Be notified when a long running machine learning (or any job for that matter) is finished running. It is literally as simple as adding a line like this at the end of your python notebook:
Pushover has support for Python, but I find using curl via bash is much easier as you can create them in one place and call them from anywhere. I have a lot of pushover-xxx scripts that use a custom icon and header depending on the task. You can also use cosmetic formatting with HTML and even create lock screen widgets that update for frequently used updates. The above script is as simple as this:
Throw that in a sh script changing the app token, user key and setting message to $1 and your set. You can also notify specific devices or just use your default user key that sends to all devices.
Any questions just let me know but it is super easy and extremely helpful. It isn’t limited to machine learning, I use it all over the place for things like notifying me when a backup fails or a mounted cloud drive has to be remounted.
Say you are training a model, and it is going to take 4 hours. You can wait and check a few times when it starts getting near 4 hrs time, or just have it send you a push notification when it is finished and not have to worry about it.
This is a great idea.
Although I should add that its possible to get cheaper(free) solutions for Android and Desktops (and probably even iOS) Maybe something like IFTTT will do it.
@harveyslash If you have success with something, could you please write a short instructions. I have heard a lot about IFTTT, but never used it. I’d greatly appreciate it. Maximizing GPU utilization seems to be my new sport
I have a silly question - if you want your Pc to notify your phone, do you have ro pay twice? (Pc & android)
Besides that, great tip! I’ve once tried to make my computer “beep” at the end if trainig, but it didn’t work…
IFTTT does work but not nearly as clean and easy, and $4.99 one time fee is nothing in the swing of things. It is far more customizable with PushOver than putting something through IFTTT and IFTTT is slow and flakey. Instead of 1 second it can be as long as 15 minutes before you get the push.
IFTTT is free, but it is also slow ( as much as 15 minute instead of 1 second), buggy, and lacks a lot of the customization you can do with the pretty html messages. It does work, but to be honest I wouldn’t use it just to save $5. I use IFTTT for other things, but I much prefer PushOver for notifications.
My experience with IFTTT is very flakey, and they claim it can take up to 15 minutes for them to check a trigger. I also get triggers that used to work and then all of a sudden stop working for no reason. I have about 30 triggers on IFTTT and every so often I have to go in and delete them and recreate them.
Yes, it is $4.99 (one-time fee for life) per platform. If you pay for iOS you can have 15 iphones and 10 iPads all for $4.99 one-time. Want Android? Another $4.99 for as many devices as you like. I don’t like the desktop as it requires you to keep a tab loaded in chrome 24/7 to get the desktop notifications. It isn’t a full client, so I just use iOS for $4.99.
I haven’t used it yet, but PushOver also does widgets that you can have on your lock screen and get updated in real time. For example, you can make a widget that shows the current accuracy and epoch and have it pushing updates regularly to your lock screen. I haven’t messed with it, but pretty cool.
While we are on the topic of checking time and monitoring, I thought I would share another tip. If you want to know how long each cell took, you can use the magic command
%%time
However, if you install the package ipython-autotime (pip install ipython-autotune), you can print the time of execution for each cell automatically if you include the following in each notebook. I usually put it next to my %matplotlib inline
The widget functionality I was talking about before you can read about here
you can do some cool stuff like have a dashboard showing (and updating in real time or better yet every epoch/batch) your current epoch, current loss, current accuracy and monitor it from your phone.