unable to evaluate lambdas, lambda workers did not start...

User 690 | 12/31/2014, 9:55:09 AM

Hi Everybody, Why is the following simple piece of code having trouble?

In [5]: sf = graphlab.SFrame({'letter':['a','b','c'], 'num' : [1,2,3]})

In [6]: sf.flat_map(['letter','num'],lambda x : [[x['letter'],x['num']]] if x['num']%2==1 else [])

when run gives the following error.. Thanks, Sunil.


RuntimeError Traceback (most recent call last) <ipython-input-6-7c623360c5b0> in <module>() ----> 1 sf.flat_map(['letter','num'],lambda x : [[x['letter'],x['num']]] if x['num']%2==1 else [])

/home/sunil/graphlab/lib/python2.7/site-packages/graphlab/datastructures/sframe.pyc in flatmap(self, columnnames, fn, columntypes, seed) 2013 assert len(columntypes) == len(columnnames), "Number of output columns must match the size of column names" 2014 with cythoncontext(): -> 2015 return SFrame(proxy=self.proxy.flatmap(fn, columnnames, column_types, seed)) 2016 2017 def sample(self, fraction, seed=None):

/home/sunil/graphlab/lib/python2.7/site-packages/graphlab/cython/context.pyc in exit(self, exctype, excvalue, traceback) 21 def exit(self, exctype, excvalue, traceback): 22 if not self.showcythontrace and exctype: ---> 23 raise exctype(exc_value)

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

Comments

User 940 | 12/31/2014, 7:13:46 PM

Hi Sunil,

Unfortunately, I was unable to reproduce the problem.

It's possible that you have conflicting pythons. Which python version are you using?

We also recommend installing GraphLab within a clean virtualenv to minimize potential conflicts. Could you try that?

Cheers! -Piotr


User 690 | 1/2/2015, 2:06:53 AM

You are right about the conflicting python-issue. A reinstall fixed the issue. Thanks for the valuable suggestion.