ipython parallel push custom object -



ipython parallel push custom object -

i unable send object direct view workers. here want do:

class test: def __init__(self): self.id = 'ddfdf' ipython.parallel import client rc = client() dv = rc[:] t = test() dv['t'] = t print dv['t'] nameerror: name 't' not defined

this work if seek force pandas object or of build in objects. way custom object?

i tried:

dv['test'] = test dv['t'] = t print dv['t'] unpicklingerror: newobj class argument isn't type object

for interactively defined classes (in __main__), need force class definition, or utilize dill. doesn't appear work old-style classes, bug in ipython's handling of old-style classes[1]. code works fine if utilize new-style class:

class test(object): ...

instead of on old-style class. note old-style classes not available in python 3. it's thought utilize new-style classes anyway.

parallel-processing ipython

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -