[SciPy-Dev] scipy.optimize enh: modified _differentialevolution.py to enable parallel evaluation of the objective function for the whole population

Pavel Ponomarev pavel.v.ponomarev at gmail.com
Wed May 13 10:08:40 EDT 2015


Hello,

Here is the modified file which works for parallel execution of the
objective functions for the whole population:
https://gist.github.com/pavelponomarev/20ea37324b219c7ed461/revisions

The discussion started here:
https://github.com/scipy/scipy/issues/4864

The additional boolean parameter "parallel" basically changes the required
argument of the objective function from single set of parameters to a list
of sets of parameters for the whole population. This enables the execution
of DE in parallel.

def pareval(listcoords):
    listresults = joblib.Parallel(n_jobs=num_cores)(delayed(objfunc)(i) for
i in listcoords)
    return listresults

result = differential_evolution(pareval, LIMS, parallel=True, polish=False)



BR, Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20150513/1712fcde/attachment.html>


More information about the SciPy-Dev mailing list