New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel Differential Evolution based on pools #5054
Conversation
…uasi-aggressive which means updating the best individual after subpopulation is evaluated. The size of the subpopulation is the number of parallel workers.
…lation. Required for qulitative assessment of the convergence and for setting custom stopping criterions
…ong to the alghorithm and it is applicable and feasible to a limited class of objective functions.
A few remarks following a quick review of your commits:
|
Yes, |
To the technical parts of adding the pools:
.
(i) having same name for the module and the classes causes problems.
(ii) the pool modules should be private, ie., rename `Spool.py` ->
`_spool.py`
(iii) in addition to adding the pools to `__all__` in `__init__.py`, you
need to import them, via `from ._spool import SPool`.
(iv) nitpick -- the classes should be named `SPool`, `MPIPool`, `JLPool`
(maybe `JoblibPool`) to follow proper camelcase
.
The bikeshedding question is whether `scipy.optimize.pools` is a good
place for them. Perhaps not, because they could be useful also for other
things than `scipy.optimize`. There are a some other alternatives such
as putting them in `scipy.misc`, or, putting them in `scipy._lib` and
importing from there to `scipy.optimize` top-level (and similarly in
other modules using them).
|
I think that the introduction of pool code is going to complicate this PR. Presumably all the pool objects have a map method. A default pool map for testing parallelisation could be from the multiprocessing module. Users can supply their own pool objects instead if they want to. |
@andyfaff , agree. |
To who looks at this PR: the main discussion on how the API for parallelization should look is in gh-4864. This PR cannot be merged until a decision is made there. |
The quasi-agressive execution of DE in parallel is enabled here. The whole population is broken on subpopulations of lengthes pool.poolsize(), which are executed in parallel. Significantly reduces optimization time in case of computationally-expensive objective functions. Solves scipy#5054
This PR is broken to several smaller PRs. Follow here #5141. |
Thanks @pavelponomarev |
The quasi-agressive execution of DE in parallel is enabled here. The whole population is broken on subpopulations of lengthes pool.poolsize(), which are executed in parallel. Significantly reduces optimization time in case of computationally-expensive objective functions. Solves scipy#5054
The Diferential Evolution algorithm modified for parallel execution. This is beneficial for computationally-expensive objective functions. MPI and joblib pools are also provided taken from emcee project.The API is modified to fix legacy problems and use particulars of population-based optimization algorithms in full. Solves #4864.