eli5 icon indicating copy to clipboard operation
eli5 copied to clipboard

parallel execution for permutation_importance

Open luoq opened this issue 7 years ago • 8 comments

luoq avatar Nov 03 '17 06:11 luoq

Codecov Report

Merging #244 into master will decrease coverage by 0.38%. The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master     #244      +/-   ##
==========================================
- Coverage   97.26%   96.88%   -0.39%     
==========================================
  Files          44       44              
  Lines        2851     2855       +4     
  Branches      541      542       +1     
==========================================
- Hits         2773     2766       -7     
- Misses         41       48       +7     
- Partials       37       41       +4
Impacted Files Coverage Δ
eli5/sklearn/permutation_importance.py 100% <100%> (ø) :arrow_up:
eli5/permutation_importance.py 90.62% <80%> (-9.38%) :arrow_down:
eli5/sklearn/utils.py 87.32% <0%> (-2.82%) :arrow_down:
eli5/lime/utils.py 85.13% <0%> (-1.36%) :arrow_down:
eli5/xgboost.py 98.17% <0%> (-1.22%) :arrow_down:
eli5/lime/lime.py 96% <0%> (-1%) :arrow_down:

codecov-io avatar Nov 03 '17 07:11 codecov-io

Thanks, looks like a great feature!

Tests are failing in Python 2.7; I'm not sure what it takes to make it work. Does it at least work with n_jobs=1?

kmike avatar Nov 09 '17 19:11 kmike

It seems in py2 instance method cannot be pickled in default. https://gist.github.com/luoq/703ec045827caf5a504ff97376db9c3e https://stackoverflow.com/questions/1816958/cant-pickle-type-instancemethod-when-using-multiprocessing-pool-map?rq=1

luoq avatar Nov 10 '17 02:11 luoq

It's fixed after python3.5: https://stackoverflow.com/questions/45901505/python3-6-can-pickle-instance-method-staticmethod-classmethod-but-document-say

luoq avatar Nov 10 '17 02:11 luoq

Are you still working on this? Would be very useful.

thomasfrederikhoeck avatar Oct 25 '18 08:10 thomasfrederikhoeck

will you drop python2 soon, so this pr gets merged?

eyadsibai avatar Mar 20 '19 23:03 eyadsibai

shall we switch this to use https://joblib.readthedocs.io/en/latest/parallel.html instead?

eyadsibai avatar Mar 20 '19 23:03 eyadsibai

Can I ask what happened to this? Is there now a way to use eli5.sklearn.PermutationImportance() in parallel?

aridf avatar Jun 16 '22 11:06 aridf