[IPython-User] Multiprocessing Pool woes

Jeffrey Bush jeff@coderforlife....
Wed Feb 12 00:04:38 CST 2014

Yes, functools.partial objects are callable objects not real functions so
they don't have a func_code object to steal. It would likely be possible to
make it work, but basically you are going to keep running into problems. If
there is a built-in solution is will be much better.

Additionally, if you can write the function in an importable module (aka
its own .py file), then it always works. I know that doing that is not very
in-line with the normal workflow of IPython Notebook however.


On Tue, Feb 11, 2014 at 2:21 PM, pbr <tim.pierson@gmail.com> wrote:

> Thanks for the code, Jeff, the pool examples now work.
> Unfortunately, what I actually need to work is the DEAP evolutionary
> pool.map wrapper.  It passes a functools.partial object which is maybe not
> one of the function types that this workaround will handle?
> see here for library info:
> http://nbviewer.ipython.org/github/DEAP/notebooks/blob/master/SIGEvolution.ipynb
> I still haven't tried the master branch, i'll give that a shot.
> --
> View this message in context:
> http://python.6.x6.nabble.com/Multiprocessing-Pool-woes-tp5047050p5047099.html
> Sent from the IPython - User mailing list archive at Nabble.com.
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20140211/e05428b6/attachment.html 

More information about the IPython-User mailing list