-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
PERF Use joblib.Parallel backend='threading' for sparse_encode when called with algorithm='lasso_cd' #4896
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
Comments
@arthurmensch you might be interested in this. |
Profiling |
If this is the case it means that the Cython code is actually not in the critical part. Upon further inspection of some profiling results with |
Removing the "Easy" tag, as it's not such an easy issue anymore... |
On |
This is outdated and should be close |
@ogrisel close? |
Closing. |
Since we released the GIL in most of the Cython coordinate descent solver (#3102), we could now sparse encode in parallel efficiently with threads when using that solver.
Making this change in the code of
sparse_encode
should be straightforward and the tests should stay the same but accepting a PR for that will require running some benchmarks to check that switching to the threading backend improves memory usage, reduces scheduling overhead and therefore should slightly improve overall sparse encoding speed.Note: Using threading for the LARS solver might not be efficiently parallelizable with threads. The LARS solver is primarily written in Python / NumPy although we should check as numpy releases the GIL often.
The text was updated successfully, but these errors were encountered: