Skip to content

ENH: Add mp_context plugin arg for MultiProc #2778

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

Merged
merged 1 commit into from
Nov 15, 2018

Conversation

effigies
Copy link
Member

Summary

For Python 3.7+, concurrent.futures.ProcessPoolExecutor can take initialization arguments and a multiprocessing context. This will allow Python 3.7 users to recover some of the lost flexibility of LegacyMultiProc.

List of changes proposed in this PR (pull-request)

  • Add mp_context PluginArg for MultiProc.
  • Restore initialization arguments

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@codecov-io
Copy link

Codecov Report

Merging #2778 into master will decrease coverage by <.01%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2778      +/-   ##
=========================================
- Coverage    67.5%   67.5%   -0.01%     
=========================================
  Files         340     340              
  Lines       43271   43275       +4     
  Branches     5364    5364              
=========================================
+ Hits        29211   29213       +2     
- Misses      13360   13361       +1     
- Partials      700     701       +1
Flag Coverage Δ
#smoketests 50.6% <85.71%> (ø) ⬆️
#unittests 64.91% <85.71%> (-0.01%) ⬇️
Impacted Files Coverage Δ
nipype/pipeline/plugins/multiproc.py 84.56% <85.71%> (-0.25%) ⬇️
nipype/testing/utils.py 89.65% <0%> (-1.73%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e475331...2042bf6. Read the comment docs.

Copy link
Contributor

@oesteban oesteban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very much needed. LGTM

@effigies effigies added this to the 1.1.6 milestone Nov 15, 2018
@effigies effigies merged commit ac40764 into nipy:master Nov 15, 2018
@effigies effigies deleted the enh/multiproc_init branch November 15, 2018 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants