Scatter Plot Bug Fix in Dato’s GraphLab Create ML Package in Python

I have been using Dato’s GraphLab Create for Coursera’s new Machine Learning Specialization that uses Python. Like me, if you’ve been facing trouble obtaining scatter plots on your canvas in GraphLab Create despite the following code:

graphlab.canvas.set_target('ipynb')

…then no worries, there is a quick fix. I’ve been deliberately lousy with the presentation, so sorry about that. Chances are that no one’s going to end up reading this anyway. I saw this problem being discussed on a Dato forum, so I decided to blog about the fix.

EDIT: Note that this problem is in GraphLab Create v1.6 only. They came up with v1.6.1 a few days after the problem was escalated on their forum, so a good option would be to upgrade GraphLab Create.

The problem you face should looks something like this (click images below to enlarge):Screenshot from 2015-09-25 14:10:20

To solve the problem:

Locate sframe.py from your home directory by searching for it from your desktop environment (applies to Windows users too). I found it in the following path on my computer:

~/anaconda/lib/python2.7/site-packages/graphlab/canvas/views

The file sframe.py should look like this:

Screenshot from 2015-09-25 15:49:44

Then replace the code in lines 255-227 of the opened .py file with the code highlighted below:

Screenshot from 2015-09-25 15:53:19

This should take care of the problem for good.

Now you have your desired result:

Screenshot from 2015-09-25 16:18:41

Advertisements

4 thoughts on “Scatter Plot Bug Fix in Dato’s GraphLab Create ML Package in Python

  1. Thanks Anirudh! I appreciate your effort to solve the problem, but for beginners with little programming background like me it’s really hard to follow what’s going on in the figures. I’m working on Windows and some of your initial commands didn’t work in the cmd prompt so I am unable to follow the rest.

    If I have understood properly, there’s a file called “sframe.py” that has to be modified. Could it be done in some other way?

    Thank you!
    Sergio

    Like

  2. Hi Sergio,

    Yes, my solution is rather beginner-unfriendly. This post is unnecessarily convoluted. I usually tend to look at this blog as a sort of daily-diary where I simply document problems I faced, and measures I took to rectify them.

    Having said that, you have understood it correctly. If you’re on Windows, all you have to do is find / search sframe.py and edit lines 255-257 with the code shown as highlighted in one of the images of this blog post. For that you can use the search bar in Windows, from your home / user directory, containing the Anaconda directory, make the edit, and you’re good to go.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s