2014-10-07 11:05 GMT+02:00 Olivier Grisel <[email protected]>:
> I would be more precise and say Python's multiprocessing module can
> only be used on picklable callables (e.g. functions or classes with a
> __call__ method) applied to picklable arguments.

Even more precisely, the problem is sending a lambda to a forked
worker process. For that, it needs to be serialized using pickle, and
that's just not supported. Functions defined at top-level don't have
this problem, since they can be referred to by name in the other
process. Partial functions built with functools.partial also work, as
long as they're specializations of such functions (but only in 2.7 and
up, IIRC). With multithreading, the problem doesn't exist either.

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to