Skip to content

[MRG] New context manager API for joblib.Parallel - #221

Merged
lesteve merged 1 commit into
joblib:masterfrom
ogrisel:context-manager
Jul 22, 2015
Merged

lesteve merged 1 commit into
joblib:masterfrom
ogrisel:context-manager

Conversation

@ogrisel

@ogrisel ogrisel commented Jul 15, 2015

Copy link
Copy Markdown
Contributor

This should make it easier to use parallel calls interleaved in loop as done in scikit-learn/scikit-learn#4873 for instance (ping @arthurmensch).

@ogrisel

ogrisel commented Jul 15, 2015

Copy link
Copy Markdown
Contributor Author

@arthurmensch if you want to try this branch of joblib with scikit-learn you can git clone joblib, checkout this branch then run pip install -e . in this folder to install joblib in developer mode. Then create a ~/.pythonstartup.py file with the following monkeypatching code:

try:
    import joblib
    from sklearn.externals import joblib as skl_joblib
    print('Monkeypatching scikit-learn embedded joblib')
    for k, v in vars(joblib).items():
        setattr(skl_joblib, k, v)
    del skl_joblib, joblib
except ImportError:
    pass

@ogrisel

ogrisel commented Jul 17, 2015

Copy link
Copy Markdown
Contributor Author

@GaelVaroquaux @lesteve you might want to have a quick look at this. Esp. the tests and the doc if you are in a hurry.

Comment thread joblib/parallel.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"to protect to coordinate". Did you mean to only use one of the two verbs?

Comment thread joblib/test/test_parallel.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo: available
typo: exception

@ogrisel
ogrisel force-pushed the context-manager branch 2 times, most recently from c687d54 to 64d1292 Compare July 21, 2015 09:22
@ogrisel

ogrisel commented Jul 21, 2015

Copy link
Copy Markdown
Contributor Author

@lesteve all comments are addressed and appveyor has run the tests under windows as well. Once merged I think we should release beta3 and sync sklearn to get the opportunity to test it.

@lesteve

lesteve commented Jul 22, 2015

Copy link
Copy Markdown
Member

Merging, thanks!

lesteve added a commit that referenced this pull request Jul 22, 2015
[MRG] New context manager API for joblib.Parallel
@lesteve
lesteve merged commit 57f5458 into joblib:master Jul 22, 2015
@lesteve

lesteve commented Jul 22, 2015

Copy link
Copy Markdown
Member

I'll do a release and open a PR in scikit-learn.

@GaelVaroquaux

GaelVaroquaux commented Jul 22, 2015 via email

Copy link
Copy Markdown
Member

@ogrisel

ogrisel commented Jul 22, 2015

Copy link
Copy Markdown
Contributor Author

🍻

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