GraphLab Create / Canopy - Runtime Exception. Unable to evaluate lambdas.

User 2380 | 10/7/2015, 6:54:15 PM

I am using GraphLab Create + Enthought Canopy Express installed on Win 7 Pro

Following commands work.

sf = graphlab.SFrame.read_csv('people-example.csv')


def transform_country(country):
    if country == "USA":
        return 'United States'
        return country


Whereas when I run the following code -

sf['Country'] = sf['Country'].apply(transform_country)

I am getting Runtime Exception

RuntimeError                              Traceback (most recent call last)
<ipython-input-28-58b2d3ea026a> in <module>()
----> 1 sf['Country'].apply(transform_country)

C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\data_structures\sarray.pyc in apply(self, fn, dtype, skip_undefined, seed)
   1625         with cython_context():
-> 1626             return SArray(_proxy=self.__proxy__.transform(fn, dtype, skip_undefined, seed))

C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy\User\lib\site-packages\graphlab\cython\context.pyc in __exit__(self, exc_type, exc_value, traceback)
     47             if not self.show_cython_trace:
     48                 # To hide cython trace, we re-raise from here
---> 49                 raise exc_type(exc_value)
     50             else:
     51                 # To show the full trace, we do nothing and let exception propagate

RuntimeError: Runtime Exception. Unable to evaluate lambdas. lambda workers did not start

for further details please refer to my question on stackoverflow graphlab-create-canopy-runtime-exception-unable-to-evaluate-lambdas

Any inputs you may provide on how I troubleshoot this further will be very helpful.


User 2380 | 10/7/2015, 7:51:57 PM

Does graphlab have a runtime dependency on Cython?

User 940 | 10/8/2015, 9:29:04 PM

Hi @abhi,

I do not believe we have runtime dependency on Cython.

Could you run the following code, it will help us debug:

sa = graphlab.SArray([1,2,3]) sa.apply(lambda x: x*2)

Thanks for your patience!

Cheers! -Piotr

User 2356 | 10/12/2015, 8:58:11 AM


I am also having the same problem, in my local installation : sa = graphlab.SArray([1,2,3]) sa.apply(lambda x: x*2)

raceback (most recent call last): File "/home/anaconda/lib/python2.7/site-packages/IPython/core/", line 3035, in runcode exec(codeobj, self.userglobalns, self.userns) File "<ipython-input-4-bbbff74e4bec>", line 2, in <module> sa.apply(lambda x: x*2) File "/home/anaconda/lib/python2.7/site-packages/graphlab/datastructures/", line 1626, in apply return SArray(proxy=self.proxy.transform(fn, dtype, skipundefined, seed)) File "/home/anaconda/lib/python2.7/site-packages/graphlab/cython/", line 49, in exit raise exctype(excvalue) RuntimeError: Runtime Exception. Unable to evaluate lambdas. lambda workers did not start

User 2356 | 10/12/2015, 9:06:19 AM

Now I tried in the server , it is now not even working in the server , earlier it used to work! did not install any new packages too.? this seems to be a very common problem here since ages which has not been fixed.

User 15 | 10/16/2015, 6:54:08 PM

Hi @abby,

Yeah, this is a common problem. It appears unfixed because it can crop up for a host of reasons, all environment related. For instance, the person who started this post is using Windows, and you clearly aren't from your stacktrace. The fix will be different for both of you because of this. We've fixed cases that we've come across, but more ways for our lambda workers to die keep getting found. We've got a fundamental change with how workers are launched in review, and hopefully that should take care of all of these errors.

I don't really know what you mean by "Now I tried in the server , it is now not even working in the server". What do you mean by server? Is this a different computer that you have access to? The server process in GLC?

To diagnose this, please post the output of running this on your terminal: /home/anaconda/lib/python2.7/site-packages/graphlab/pylambda_worker

And @abhi, this may be due to having an old Python installation on your machine, or a python27.dll in your PATH. If this file exists: C:\Windows\System32\python27.dll, then this is what's stopping the lambda workers from launching. For whatever reason, when you install python from, it puts that library in the system location, which will always be found first. If you don't want that python installation, uninstall it. Furthermore, often there are other programs that bundle their own python27.dll and insert themselves in your PATH environment variable. As long as you have C:\Users\kittuNnivvi\AppData\Local\Enthought\Canopy in your PATH before those paths (or wherever Enthought keeps their python27.dll I've never actually used it), then our lambda workers will launch successfully.

And stay tuned for our next release, where this all should vastly improve.

Thanks for your patience!