-
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
Description
This works:
>>> def model(x):
... from mystic.models import griewangk
... return griewangk(x)
...
>>> from pathos.pools import ParallelPool
>>> p = ParallelPool()
>>> p.map(model, [[1,2,3],[4,5,6]])
[1.0170279701835734, 1.591708292293129]
>>>
However, without the encapsulated import, the map will hang (and require python to be manually killed). ppft provides the ability for the user to pass the appropriate required modules to the map, however a timeout could also be added for when the import is missing (or something else has gone awry that is causing the map to hang).