Open xgdgsc opened 9 years ago
This appears to be a serialization problem, specific to Windows. It's surprising that this occurs, since we only use standard libraries for all these tasks, so in principle this should work on all Python platforms. Which Python version are you currently using? It should work for version 2.7 or higher, though admittedly we've never actually tested parallelization on Windows.
We could probably fix this by using some drop-in replacement of pickle
(such as cloudpickle
or dill
), but I'd prefer not to add dependencies.
I have anaconda python 3.4. http://stackoverflow.com/a/21345423/1136027 maybe helpful. Anyway, using linux is fine for me.
I believe the issue is with serializing closures. In other cases replacing closures with classes with a call method solved the problem
Hi. I'm experiencing the same issue. Would you care to exlain "replacing closures with classes with a call method solved the problem" ? I would very much like to be able to run optunity on my PC
it appears that pickling funtions is problematic, so instead of defining a function: def f (): ....
use a callable class: class f_class: def call(): ....
and then p = f_class()
Hello, I ran into the same problem. @ophiry can you provide a full code snippet, because I cannot manage to implement the snippet you provided.
Also, @claesenm , will there be a fix for this. If not, it might be a good idea to add some section in the documentation about parallelization limitations in Windows. My operating system: Windows 10, 64bit
when trying to use pmap in windows, it would raise exception:
On linux it is fine. Is it a limitation of windows version of multiprocessing that cannot be avoided?