8000 FIX Parallelisation of decomposition/sparse_encode (#13005) · thomasjpfan/scikit-learn@7527c25 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7527c25

Browse files
nixphixthomasjpfan
authored andcommitted
FIX Parallelisation of decomposition/sparse_encode (scikit-learn#13005)
1 parent 73393c6 commit 7527c25

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

doc/whats_new/v0.20.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ Changelog
2222
threaded when `n_jobs > 1` or `n_jobs = -1`.
2323
:issue:`12949` by :user:`Prabakaran Kumaresshan <nixphix>`.
2424

25+
:mod:`sklearn.decomposition`
26+
...........................
27+
28+
- |Fix| Fixed a bug in :func:`decomposition.sparse_encode` where computation was single
29+
threaded when `n_jobs > 1` or `n_jobs = -1`.
30+
:issue:`13005` by :user:`Prabakaran Kumaresshan <nixphix>`.
31+
2532
:mod:`sklearn.linear_model`
2633
...........................
2734

sklearn/decomposition/dict_learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def sparse_encode(X, dictionary, gram=None, cov=None, algorithm='lasso_lars',
300300
if regularization is None:
301301
regularization = 1.
302302

303-
if effective_n_jobs(n_jobs) or algorithm == 'threshold':
303+
if effective_n_jobs(n_jobs) == 1 or algorithm == 'threshold':
304304
code = _sparse_encode(X,
305305
dictionary, gram, cov=cov,
306306
algorithm=algorithm,

0 commit comments

Comments
 (0)
0