[IPython-User] Problem with load_balanced_view()
Neal Becker
ndbecker2@gmail....
Fri Jun 15 09:54:44 CDT 2012
What am I doing wrong here? Tried to call 'run_line' directly, but I get
'run_line' not defined. So I tried again with decorator, but no diff:
from my_script import run_line
from IPython.parallel import Client
rc = Client()
lview = rc.load_balanced_view()
if __name__ == '__main__':
[ build list of tests...]
@lview.parallel()
def run_it (cmdline):
return run_line (cmdline)
parallel_result = lview.map(lambda t: run_it(cmdline=t), tests)
CompositeError: one or more exceptions from call to method: <lambda>
[4:apply]: NameError: global name 'run_it' is not defined
[1:apply]: NameError: global name 'run_it' is not defined
[0:apply]: NameError: global name 'run_it' is not defined
[2:apply]: NameError: global name 'run_it' is not defined
[7:apply]: NameError: global name 'run_it' is not defined
[3:apply]: NameError: global name 'run_it' is not defined
More information about the IPython-User
mailing list