From: Yaroslav Halchenko Date: Tue, 13 May 2014 14:07:58 +0000 (+0000) Subject: use system-wide joblib and do not attempt to install joblib/test X-Git-Tag: archive/raspbian/0.18-5+rpi1~1^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6b10f4e16aeab53f5fd643721686fbe16bcded5f;p=scikit-learn.git.old use system-wide joblib and do not attempt to install joblib/test Relies on DFSG-ed sources with no joblib present Gbp-Pq: Name deb_use_system_joblib --- diff --git a/sklearn/externals/joblib/__init__.py b/sklearn/externals/joblib/__init__.py new file mode 100644 index 0000000..b3dac41 --- /dev/null +++ b/sklearn/externals/joblib/__init__.py @@ -0,0 +1,3 @@ +# yoh: use system-wide joblib + +from joblib import * diff --git a/sklearn/externals/setup.py b/sklearn/externals/setup.py index bc8a0e7..936f032 100644 --- a/sklearn/externals/setup.py +++ b/sklearn/externals/setup.py @@ -5,6 +5,5 @@ def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('externals', parent_package, top_path) config.add_subpackage('joblib') - config.add_subpackage('joblib/test') return config diff --git a/sklearn/metrics/pairwise.py b/sklearn/metrics/pairwise.py index d340b88..a8bb6f1 100644 --- a/sklearn/metrics/pairwise.py +++ b/sklearn/metrics/pairwise.py @@ -47,7 +47,7 @@ from ..utils.extmath import safe_sparse_dot from ..preprocessing import normalize from ..externals.joblib import Parallel from ..externals.joblib import delayed -from ..externals.joblib.parallel import cpu_count +from ..externals.joblib import parallel from .pairwise_fast import _chi2_kernel_fast @@ -559,7 +559,7 @@ def _parallel_pairwise(X, Y, func, n_jobs, **kwds): """Break the pairwise matrix in n_jobs even slices and compute them in parallel""" if n_jobs < 0: - n_jobs = max(cpu_count() + 1 + n_jobs, 1) + n_jobs = max(parallel.cpu_count() + 1 + n_jobs, 1) if Y is None: Y = X