From 14d21f3bc2af02247d67335c52303b17a8eac49e Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan Date: Thu, 17 Jan 2019 22:40:28 +0530 Subject: [PATCH 1/3] FIX parallelisation of dict learning --- sklearn/decomposition/dict_learning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/decomposition/dict_learning.py b/sklearn/decomposition/dict_learning.py index eb5e4f2588612..1c16782bb3496 100644 --- a/sklearn/decomposition/dict_learning.py +++ b/sklearn/decomposition/dict_learning.py @@ -300,7 +300,7 @@ def sparse_encode(X, dictionary, gram=None, cov=None, algorithm='lasso_lars', if regularization is None: regularization = 1. - if effective_n_jobs(n_jobs) or algorithm == 'threshold': + if effective_n_jobs(n_jobs) == 1 or algorithm == 'threshold': code = _sparse_encode(X, dictionary, gram, cov=cov, algorithm=algorithm, From 2050cad60fe3ea441bf3895b79d09b8e9e7a04f6 Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan Date: Fri, 18 Jan 2019 21:47:05 +0530 Subject: [PATCH 2/3] Add whats new entry --- doc/whats_new/v0.20.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/whats_new/v0.20.rst b/doc/whats_new/v0.20.rst index 73c607adb1633..dbf176f5fb1d1 100644 --- a/doc/whats_new/v0.20.rst +++ b/doc/whats_new/v0.20.rst @@ -22,6 +22,13 @@ Changelog threaded when `n_jobs > 1` or `n_jobs = -1`. :issue:`12949` by :user:`Prabakaran Kumaresshan `. +:mod:`sklearn.decomposition` +........................... + +- |Fix| Fixed a bug in :meth:`decomposition.sparse_encode` where computation was single + threaded when `n_jobs > 1` or `n_jobs = -1`. + :issue:`13005` by :user:`Prabakaran Kumaresshan `. + :mod:`sklearn.linear_model` ........................... From 32c422d9593b2bfd99bb9520056d9f1cdd2f5b4d Mon Sep 17 00:00:00 2001 From: Prabakaran Kumaresshan Date: Sun, 20 Jan 2019 09:50:19 +0530 Subject: [PATCH 3/3] Change :meth: to :func: --- doc/whats_new/v0.20.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/whats_new/v0.20.rst b/doc/whats_new/v0.20.rst index dbf176f5fb1d1..0afda87c3480b 100644 --- a/doc/whats_new/v0.20.rst +++ b/doc/whats_new/v0.20.rst @@ -25,7 +25,7 @@ Changelog :mod:`sklearn.decomposition` ........................... -- |Fix| Fixed a bug in :meth:`decomposition.sparse_encode` where computation was single +- |Fix| Fixed a bug in :func:`decomposition.sparse_encode` where computation was single threaded when `n_jobs > 1` or `n_jobs = -1`. :issue:`13005` by :user:`Prabakaran Kumaresshan `.