Skip to content
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

Closed
wants to merge 10 commits into from

Conversation

pavelponomarev
Copy link

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.

@dlax dlax added scipy.optimize needs-work Items that are pending response from the author labels Jul 15, 2015
@dlax
Copy link
Member

dlax commented Jul 15, 2015

A few remarks following a quick review of your commits:

  • when you introduce backwards incompatible changes, you need to add some deprecation warnings
  • there is no test related to your changes, we need some
  • there are some commits at the end that do not appear clearly related to parallelization of DE, these should be submitted as separate PR
  • the commit history is quite messy, it would ease reviewing if you could rewrite the history by isolating changes into atomic commits and avoid changing things back and forth between commits

@pavelponomarev
Copy link
Author

Yes,
Before I rewrite the code, please check the first and second commits. Is this a right way to include additional helper modules (pools) to the directory tree of the project? Is additional folder pools acceptable? Is the usage of the file pools/__init__.py correct?

@pv
Copy link
Member

pv commented Jul 16, 2015 via email

@andyfaff
Copy link
Contributor

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.
It's not necessary to introduce these pools to scipy to continue work on this PR at this point.

@pavelponomarev
Copy link
Author

@andyfaff , agree.
Then there should be a serial pool, which is a wrapper over normal serial execution of the objective function, and a parallel pool based on multiprocessing with minimal functionality. The proper place for these two pools is then in scipy.misc.

@rgommers
Copy link
Member

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.

pavelponomarev added a commit to pavelponomarev/scipy that referenced this pull request Aug 11, 2015
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
@pavelponomarev
Copy link
Author

This PR is broken to several smaller PRs. Follow here #5141.

@rgommers
Copy link
Member

Thanks @pavelponomarev

pavelponomarev added a commit to pavelponomarev/scipy that referenced this pull request Aug 29, 2015
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-work Items that are pending response from the author scipy.optimize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants