From cd8f3e6c448c1622b26a80c62e03e42857ec099b Mon Sep 17 00:00:00 2001 From: DavHau Date: Sat, 15 May 2021 01:46:36 +0700 Subject: [PATCH 1/2] python3Packages.scikitlearn: rename to scikit-learn --- nixos/modules/services/development/jupyter/default.nix | 2 +- nixos/modules/services/development/jupyterhub/default.nix | 2 +- pkgs/development/python-modules/batchgenerators/default.nix | 4 ++-- .../python-modules/bayesian-optimization/default.nix | 4 ++-- pkgs/development/python-modules/cnvkit/default.nix | 4 ++-- pkgs/development/python-modules/dask-glm/default.nix | 4 ++-- pkgs/development/python-modules/dask-ml/default.nix | 4 ++-- pkgs/development/python-modules/dftfit/default.nix | 4 ++-- pkgs/development/python-modules/gensim/default.nix | 4 ++-- pkgs/development/python-modules/graspologic/default.nix | 4 ++-- pkgs/development/python-modules/hdbscan/default.nix | 4 ++-- pkgs/development/python-modules/hmmlearn/default.nix | 4 ++-- pkgs/development/python-modules/hyppo/default.nix | 4 ++-- pkgs/development/python-modules/ignite/default.nix | 4 ++-- pkgs/development/python-modules/imbalanced-learn/0.4.nix | 4 ++-- .../development/python-modules/imbalanced-learn/default.nix | 4 ++-- pkgs/development/python-modules/kmapper/default.nix | 4 ++-- pkgs/development/python-modules/librosa/default.nix | 4 ++-- pkgs/development/python-modules/lightgbm/default.nix | 4 ++-- pkgs/development/python-modules/mlrose/default.nix | 4 ++-- pkgs/development/python-modules/mlxtend/default.nix | 6 +++--- pkgs/development/python-modules/mne-python/default.nix | 4 ++-- pkgs/development/python-modules/moviepy/default.nix | 6 +++--- pkgs/development/python-modules/nilearn/default.nix | 4 ++-- pkgs/development/python-modules/osmnx/default.nix | 4 ++-- pkgs/development/python-modules/persim/default.nix | 4 ++-- pkgs/development/python-modules/ppscore/default.nix | 4 ++-- pkgs/development/python-modules/pygbm/default.nix | 4 ++-- pkgs/development/python-modules/pynndescent/default.nix | 4 ++-- .../python-modules/pytorch-metric-learning/default.nix | 4 ++-- pkgs/development/python-modules/qiskit-aqua/default.nix | 4 ++-- pkgs/development/python-modules/qiskit-ignis/default.nix | 4 ++-- pkgs/development/python-modules/ripser/default.nix | 4 ++-- pkgs/development/python-modules/scikit-bio/default.nix | 4 ++-- .../python-modules/{scikitlearn => scikit-learn}/0.20.nix | 0 .../{scikitlearn => scikit-learn}/default.nix | 0 pkgs/development/python-modules/scikit-optimize/default.nix | 4 ++-- pkgs/development/python-modules/scikit-tda/default.nix | 4 ++-- pkgs/development/python-modules/seqeval/default.nix | 4 ++-- pkgs/development/python-modules/shap/default.nix | 4 ++-- pkgs/development/python-modules/sklearn-deap/default.nix | 4 ++-- pkgs/development/python-modules/skorch/default.nix | 4 ++-- pkgs/development/python-modules/textacy/default.nix | 4 ++-- pkgs/development/python-modules/umap-learn/default.nix | 4 ++-- pkgs/development/python-modules/vowpalwabbit/default.nix | 4 ++-- pkgs/development/python-modules/word2vec/default.nix | 4 ++-- pkgs/development/python-modules/xgboost/default.nix | 4 ++-- pkgs/top-level/python-packages.nix | 4 +++- pkgs/top-level/python2-packages.nix | 2 +- 49 files changed, 94 insertions(+), 92 deletions(-) rename pkgs/development/python-modules/{scikitlearn => scikit-learn}/0.20.nix (100%) rename pkgs/development/python-modules/{scikitlearn => scikit-learn}/default.nix (100%) diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix index 6a5fd6b2940e87..21b84b3bcdaa87 100644 --- a/nixos/modules/services/development/jupyter/default.nix +++ b/nixos/modules/services/development/jupyter/default.nix @@ -131,7 +131,7 @@ in { env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ ipykernel pandas - scikitlearn + scikit-learn ])); in { displayName = "Python 3 for machine learning"; diff --git a/nixos/modules/services/development/jupyterhub/default.nix b/nixos/modules/services/development/jupyterhub/default.nix index f1dcab68b00021..a1df4468cfff61 100644 --- a/nixos/modules/services/development/jupyterhub/default.nix +++ b/nixos/modules/services/development/jupyterhub/default.nix @@ -117,7 +117,7 @@ in { env = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ ipykernel pandas - scikitlearn + scikit-learn ])); in { displayName = "Python 3 for machine learning"; diff --git a/pkgs/development/python-modules/batchgenerators/default.nix b/pkgs/development/python-modules/batchgenerators/default.nix index 8706a31d57119f..336c6b2e513483 100644 --- a/pkgs/development/python-modules/batchgenerators/default.nix +++ b/pkgs/development/python-modules/batchgenerators/default.nix @@ -8,7 +8,7 @@ , numpy , pillow , scipy -, scikitlearn +, scikit-learn , scikitimage , threadpoolctl }: @@ -28,7 +28,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - future numpy pillow scipy scikitlearn scikitimage threadpoolctl + future numpy pillow scipy scikit-learn scikitimage threadpoolctl ]; checkInputs = [ pytestCheckHook unittest2 ]; diff --git a/pkgs/development/python-modules/bayesian-optimization/default.nix b/pkgs/development/python-modules/bayesian-optimization/default.nix index c41181ca7b0442..1e896d82678a45 100644 --- a/pkgs/development/python-modules/bayesian-optimization/default.nix +++ b/pkgs/development/python-modules/bayesian-optimization/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , python -, scikitlearn +, scikit-learn , scipy , pytest , isPy27 @@ -21,7 +21,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/cnvkit/default.nix b/pkgs/development/python-modules/cnvkit/default.nix index 5baa28e4bd7f2c..6347c8552bf67f 100644 --- a/pkgs/development/python-modules/cnvkit/default.nix +++ b/pkgs/development/python-modules/cnvkit/default.nix @@ -6,7 +6,7 @@ , biopython , numpy , scipy -, scikitlearn +, scikit-learn , pandas , matplotlib , reportlab @@ -42,7 +42,7 @@ buildPythonPackage rec { biopython numpy scipy - scikitlearn + scikit-learn pandas matplotlib reportlab diff --git a/pkgs/development/python-modules/dask-glm/default.nix b/pkgs/development/python-modules/dask-glm/default.nix index d091785db112b9..9072a691c20aa4 100644 --- a/pkgs/development/python-modules/dask-glm/default.nix +++ b/pkgs/development/python-modules/dask-glm/default.nix @@ -7,7 +7,7 @@ , multipledispatch , setuptools-scm , scipy -, scikitlearn +, scikit-learn , pytestCheckHook }: @@ -22,7 +22,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools-scm ]; checkInputs = [ pytestCheckHook ]; - propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikitlearn ]; + propagatedBuildInputs = [ cloudpickle dask numpy toolz multipledispatch scipy scikit-learn ]; meta = with lib; { homepage = "https://github.com/dask/dask-glm/"; diff --git a/pkgs/development/python-modules/dask-ml/default.nix b/pkgs/development/python-modules/dask-ml/default.nix index b02c9a71a6bdd6..ff1b145ee8a290 100644 --- a/pkgs/development/python-modules/dask-ml/default.nix +++ b/pkgs/development/python-modules/dask-ml/default.nix @@ -6,7 +6,7 @@ , numpy, toolz # dask[array] , numba , pandas -, scikitlearn +, scikit-learn , scipy , dask-glm , six @@ -39,7 +39,7 @@ buildPythonPackage rec { numpy packaging pandas - scikitlearn + scikit-learn scipy six toolz diff --git a/pkgs/development/python-modules/dftfit/default.nix b/pkgs/development/python-modules/dftfit/default.nix index 73791bdaa9a63a..778b8c3d9843f7 100644 --- a/pkgs/development/python-modules/dftfit/default.nix +++ b/pkgs/development/python-modules/dftfit/default.nix @@ -8,7 +8,7 @@ , pandas , scipy , numpy -, scikitlearn +, scikit-learn , lammps-cython , pymatgen-lammps , pytestrunner @@ -34,7 +34,7 @@ buildPythonPackage rec { pandas scipy numpy - scikitlearn + scikit-learn lammps-cython pymatgen-lammps ]; diff --git a/pkgs/development/python-modules/gensim/default.nix b/pkgs/development/python-modules/gensim/default.nix index be6321f86ca71d..b6b6f42b3c35e0 100644 --- a/pkgs/development/python-modules/gensim/default.nix +++ b/pkgs/development/python-modules/gensim/default.nix @@ -5,7 +5,7 @@ , six , scipy , smart_open -, scikitlearn, testfixtures, unittest2 +, scikit-learn, testfixtures, unittest2 , isPy3k }: @@ -21,7 +21,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ smart_open numpy six scipy ]; - checkInputs = [ scikitlearn testfixtures unittest2 ]; + checkInputs = [ scikit-learn testfixtures unittest2 ]; # Two tests fail. # diff --git a/pkgs/development/python-modules/graspologic/default.nix b/pkgs/development/python-modules/graspologic/default.nix index b4e8803784b565..758f988a239558 100644 --- a/pkgs/development/python-modules/graspologic/default.nix +++ b/pkgs/development/python-modules/graspologic/default.nix @@ -8,7 +8,7 @@ , matplotlib , networkx , numpy -, scikitlearn +, scikit-learn , scipy , seaborn }: @@ -31,7 +31,7 @@ buildPythonPackage rec { matplotlib networkx numpy - scikitlearn + scikit-learn scipy seaborn ]; diff --git a/pkgs/development/python-modules/hdbscan/default.nix b/pkgs/development/python-modules/hdbscan/default.nix index d2590d14955cdd..269062a1e71ee5 100644 --- a/pkgs/development/python-modules/hdbscan/default.nix +++ b/pkgs/development/python-modules/hdbscan/default.nix @@ -5,7 +5,7 @@ , numpy , pytestCheckHook , scipy -, scikitlearn +, scikit-learn , fetchPypi , joblib , six @@ -29,7 +29,7 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ cython ]; - propagatedBuildInputs = [ numpy scipy scikitlearn joblib six ]; + propagatedBuildInputs = [ numpy scipy scikit-learn joblib six ]; preCheck = '' cd hdbscan/tests rm __init__.py diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index 8d2afcf5e722b9..eb7e05afff7a2c 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -1,4 +1,4 @@ -{ lib, fetchurl, buildPythonPackage, numpy, scikitlearn, setuptools_scm, cython, pytest }: +{ lib, fetchurl, buildPythonPackage, numpy, scikit-learn, setuptools_scm, cython, pytest }: buildPythonPackage rec { pname = "hmmlearn"; @@ -10,7 +10,7 @@ buildPythonPackage rec { }; buildInputs = [ setuptools_scm cython ]; - propagatedBuildInputs = [ numpy scikitlearn ]; + propagatedBuildInputs = [ numpy scikit-learn ]; checkInputs = [ pytest ]; checkPhase = '' diff --git a/pkgs/development/python-modules/hyppo/default.nix b/pkgs/development/python-modules/hyppo/default.nix index cc0b569d9b23f6..9fdeca082b2f05 100644 --- a/pkgs/development/python-modules/hyppo/default.nix +++ b/pkgs/development/python-modules/hyppo/default.nix @@ -4,7 +4,7 @@ , fetchFromGitHub , pytestCheckHook , pytestcov , numba , numpy -, scikitlearn +, scikit-learn , scipy , matplotlib , seaborn @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numba numpy - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/ignite/default.nix b/pkgs/development/python-modules/ignite/default.nix index 71bed73f9d7b75..f745b735f342a3 100644 --- a/pkgs/development/python-modules/ignite/default.nix +++ b/pkgs/development/python-modules/ignite/default.nix @@ -8,7 +8,7 @@ , mock , pytorch , pynvml -, scikitlearn +, scikit-learn , tqdm }: @@ -24,7 +24,7 @@ buildPythonPackage rec { }; checkInputs = [ pytestCheckHook matplotlib mock pytest_xdist ]; - propagatedBuildInputs = [ pytorch scikitlearn tqdm pynvml ]; + propagatedBuildInputs = [ pytorch scikit-learn tqdm pynvml ]; # runs succesfully in 3.9, however, async isn't correctly closed so it will fail after test suite. doCheck = pythonOlder "3.9"; diff --git a/pkgs/development/python-modules/imbalanced-learn/0.4.nix b/pkgs/development/python-modules/imbalanced-learn/0.4.nix index 96ba16b1cd1af3..6709092ca955df 100644 --- a/pkgs/development/python-modules/imbalanced-learn/0.4.nix +++ b/pkgs/development/python-modules/imbalanced-learn/0.4.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchPypi, scikitlearn, pandas, nose, pytest }: +{ lib, buildPythonPackage, fetchPypi, scikit-learn, pandas, nose, pytest }: buildPythonPackage rec { pname = "imbalanced-learn"; @@ -9,7 +9,7 @@ buildPythonPackage rec { sha256 = "5bd9e86e40ce4001a57426541d7c79b18143cbd181e3330c1a3e5c5c43287083"; }; - propagatedBuildInputs = [ scikitlearn ]; + propagatedBuildInputs = [ scikit-learn ]; checkInputs = [ nose pytest pandas ]; checkPhase = '' export HOME=$PWD diff --git a/pkgs/development/python-modules/imbalanced-learn/default.nix b/pkgs/development/python-modules/imbalanced-learn/default.nix index cf3fca9aa03c10..aad2e3e07a4554 100644 --- a/pkgs/development/python-modules/imbalanced-learn/default.nix +++ b/pkgs/development/python-modules/imbalanced-learn/default.nix @@ -4,7 +4,7 @@ , isPy27 , pandas , pytestCheckHook -, scikitlearn +, scikit-learn }: buildPythonPackage rec { @@ -17,7 +17,7 @@ buildPythonPackage rec { sha256 = "0a9xrw4qsh95g85pg2611hvj6xcfncw646si2icaz22haw1x410w"; }; - propagatedBuildInputs = [ scikitlearn ]; + propagatedBuildInputs = [ scikit-learn ]; checkInputs = [ pytestCheckHook pandas ]; preCheck = '' export HOME=$TMPDIR diff --git a/pkgs/development/python-modules/kmapper/default.nix b/pkgs/development/python-modules/kmapper/default.nix index abba8354399a2a..87f22172c4959c 100644 --- a/pkgs/development/python-modules/kmapper/default.nix +++ b/pkgs/development/python-modules/kmapper/default.nix @@ -1,7 +1,7 @@ { lib , buildPythonPackage , fetchFromGitHub -, scikitlearn +, scikit-learn , numpy , scipy , jinja2 @@ -25,7 +25,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - scikitlearn + scikit-learn numpy scipy jinja2 diff --git a/pkgs/development/python-modules/librosa/default.nix b/pkgs/development/python-modules/librosa/default.nix index ce8f2a73fa7ff9..45f6bffd661cea 100644 --- a/pkgs/development/python-modules/librosa/default.nix +++ b/pkgs/development/python-modules/librosa/default.nix @@ -4,7 +4,7 @@ , joblib , matplotlib , six -, scikitlearn +, scikit-learn , decorator , audioread , resampy @@ -21,7 +21,7 @@ buildPythonPackage rec { sha256 = "af0b9f2ed4bbf6aecbc448a4cd27c16453c397cb6bef0f0cfba0e63afea2b839"; }; - propagatedBuildInputs = [ joblib matplotlib six scikitlearn decorator audioread resampy soundfile pooch ]; + propagatedBuildInputs = [ joblib matplotlib six scikit-learn decorator audioread resampy soundfile pooch ]; # No tests # 1. Internet connection is required diff --git a/pkgs/development/python-modules/lightgbm/default.nix b/pkgs/development/python-modules/lightgbm/default.nix index 1018ceaec4b2be..a887c3ec8af2bc 100644 --- a/pkgs/development/python-modules/lightgbm/default.nix +++ b/pkgs/development/python-modules/lightgbm/default.nix @@ -4,7 +4,7 @@ , cmake , numpy , scipy -, scikitlearn +, scikit-learn , llvmPackages ? null }: @@ -39,7 +39,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn ]; postConfigure = '' diff --git a/pkgs/development/python-modules/mlrose/default.nix b/pkgs/development/python-modules/mlrose/default.nix index b17b56b8f9ee9a..2187f27268014a 100644 --- a/pkgs/development/python-modules/mlrose/default.nix +++ b/pkgs/development/python-modules/mlrose/default.nix @@ -3,7 +3,7 @@ , buildPythonPackage , fetchFromGitHub , fetchpatch -, scikitlearn +, scikit-learn , pytestCheckHook , pytest-randomly }: @@ -28,7 +28,7 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ scikitlearn ]; + propagatedBuildInputs = [ scikit-learn ]; checkInputs = [ pytest-randomly pytestCheckHook ]; postPatch = '' diff --git a/pkgs/development/python-modules/mlxtend/default.nix b/pkgs/development/python-modules/mlxtend/default.nix index 44402b36ec081a..4692dc61c229a8 100644 --- a/pkgs/development/python-modules/mlxtend/default.nix +++ b/pkgs/development/python-modules/mlxtend/default.nix @@ -5,7 +5,7 @@ , pytestCheckHook , scipy , numpy -, scikitlearn +, scikit-learn , pandas , matplotlib , joblib @@ -33,7 +33,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ scipy numpy - scikitlearn + scikit-learn pandas matplotlib joblib @@ -45,7 +45,7 @@ buildPythonPackage rec { license= licenses.bsd3; maintainers = with maintainers; [ evax ]; platforms = platforms.unix; - # incompatible with nixpkgs scikitlearn version + # incompatible with nixpkgs scikit-learn version broken = true; }; } diff --git a/pkgs/development/python-modules/mne-python/default.nix b/pkgs/development/python-modules/mne-python/default.nix index bed191c39e3253..d8add2608b6a06 100644 --- a/pkgs/development/python-modules/mne-python/default.nix +++ b/pkgs/development/python-modules/mne-python/default.nix @@ -11,7 +11,7 @@ , matplotlib , nibabel , pandas -, scikitlearn +, scikit-learn }: buildPythonPackage rec { @@ -40,7 +40,7 @@ buildPythonPackage rec { matplotlib nibabel pandas - scikitlearn + scikit-learn ]; preCheck = '' export HOME=$TMP diff --git a/pkgs/development/python-modules/moviepy/default.nix b/pkgs/development/python-modules/moviepy/default.nix index 4cd1fec3d8b25b..c3acdbe71ec249 100644 --- a/pkgs/development/python-modules/moviepy/default.nix +++ b/pkgs/development/python-modules/moviepy/default.nix @@ -13,14 +13,14 @@ , advancedProcessing ? false , opencv3 ? null , scikitimage ? null -, scikitlearn ? null +, scikit-learn ? null , scipy ? null , matplotlib ? null , youtube-dl ? null }: assert advancedProcessing -> ( - opencv3 != null && scikitimage != null && scikitlearn != null + opencv3 != null && scikitimage != null && scikit-learn != null && scipy != null && matplotlib != null && youtube-dl != null); buildPythonPackage rec { @@ -40,7 +40,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy decorator imageio imageio-ffmpeg tqdm requests proglog ] ++ (lib.optionals advancedProcessing [ - opencv3 scikitimage scikitlearn scipy matplotlib youtube-dl + opencv3 scikitimage scikit-learn scipy matplotlib youtube-dl ]); meta = with lib; { diff --git a/pkgs/development/python-modules/nilearn/default.nix b/pkgs/development/python-modules/nilearn/default.nix index e3ce770398e4b4..39edd7e34da25b 100644 --- a/pkgs/development/python-modules/nilearn/default.nix +++ b/pkgs/development/python-modules/nilearn/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchPypi, pytestCheckHook, matplotlib -, nibabel, numpy, pandas, scikitlearn, scipy, joblib, requests }: +, nibabel, numpy, pandas, scikit-learn, scipy, joblib, requests }: buildPythonPackage rec { pname = "nilearn"; @@ -20,7 +20,7 @@ buildPythonPackage rec { numpy pandas requests - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/osmnx/default.nix b/pkgs/development/python-modules/osmnx/default.nix index 3cd420c7491f96..a55d26d83c289e 100755 --- a/pkgs/development/python-modules/osmnx/default.nix +++ b/pkgs/development/python-modules/osmnx/default.nix @@ -1,5 +1,5 @@ { lib, buildPythonPackage, fetchFromGitHub, geopandas, descartes, matplotlib, networkx, numpy -, pandas, requests, Rtree, shapely, folium, scikitlearn, scipy}: +, pandas, requests, Rtree, shapely, folium, scikit-learn, scipy}: buildPythonPackage rec { pname = "osmnx"; @@ -12,7 +12,7 @@ buildPythonPackage rec { sha256 = "1k3y5kl4k93vxaxyanc040x44s2fyyc3m1ndy2j3kg0037z8ad4z"; }; - propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikitlearn scipy ]; + propagatedBuildInputs = [ geopandas descartes matplotlib networkx numpy pandas requests Rtree shapely folium scikit-learn scipy ]; # requires network doCheck = false; diff --git a/pkgs/development/python-modules/persim/default.nix b/pkgs/development/python-modules/persim/default.nix index 65f3529e60c63a..2868cea4aea709 100644 --- a/pkgs/development/python-modules/persim/default.nix +++ b/pkgs/development/python-modules/persim/default.nix @@ -6,7 +6,7 @@ , joblib , matplotlib , numpy -, scikitlearn +, scikit-learn , scipy , pytestCheckHook }: @@ -26,7 +26,7 @@ buildPythonPackage rec { joblib matplotlib numpy - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/ppscore/default.nix b/pkgs/development/python-modules/ppscore/default.nix index ad3a393a00d124..43dd1f249ed8f3 100644 --- a/pkgs/development/python-modules/ppscore/default.nix +++ b/pkgs/development/python-modules/ppscore/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , isPy27 , pandas -, scikitlearn +, scikit-learn , pytestCheckHook }: @@ -23,7 +23,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ pandas - scikitlearn + scikit-learn ]; meta = with lib; { diff --git a/pkgs/development/python-modules/pygbm/default.nix b/pkgs/development/python-modules/pygbm/default.nix index 0d2747c1cb46d1..5367f622e9b8df 100644 --- a/pkgs/development/python-modules/pygbm/default.nix +++ b/pkgs/development/python-modules/pygbm/default.nix @@ -4,7 +4,7 @@ , scipy , numpy , numba -, scikitlearn +, scikit-learn , pytest , pythonOlder }: @@ -25,7 +25,7 @@ buildPythonPackage rec { scipy numpy numba - scikitlearn + scikit-learn ]; checkInputs = [ diff --git a/pkgs/development/python-modules/pynndescent/default.nix b/pkgs/development/python-modules/pynndescent/default.nix index 8cddeb8873fafc..fa9db26b5e3970 100644 --- a/pkgs/development/python-modules/pynndescent/default.nix +++ b/pkgs/development/python-modules/pynndescent/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchPypi , nose -, scikitlearn +, scikit-learn , scipy , numba , llvmlite @@ -19,7 +19,7 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ - scikitlearn + scikit-learn scipy numba llvmlite diff --git a/pkgs/development/python-modules/pytorch-metric-learning/default.nix b/pkgs/development/python-modules/pytorch-metric-learning/default.nix index fd2c80af890c38..e340d5eefada75 100644 --- a/pkgs/development/python-modules/pytorch-metric-learning/default.nix +++ b/pkgs/development/python-modules/pytorch-metric-learning/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , isPy27 , numpy -, scikitlearn +, scikit-learn , pytestCheckHook , pytorch , torchvision @@ -26,7 +26,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy pytorch - scikitlearn + scikit-learn torchvision tqdm ]; diff --git a/pkgs/development/python-modules/qiskit-aqua/default.nix b/pkgs/development/python-modules/qiskit-aqua/default.nix index b1cdd7f523cd80..3233e435f071fe 100644 --- a/pkgs/development/python-modules/qiskit-aqua/default.nix +++ b/pkgs/development/python-modules/qiskit-aqua/default.nix @@ -14,7 +14,7 @@ , qiskit-ignis , qiskit-terra , quandl -, scikitlearn +, scikit-learn , yfinance # Optional inputs , withTorch ? false @@ -59,7 +59,7 @@ buildPythonPackage rec { qiskit-terra qiskit-ignis quandl - scikitlearn + scikit-learn yfinance ] ++ lib.optionals (withTorch) [ pytorch ] ++ lib.optionals (withPyscf) [ pyscf ] diff --git a/pkgs/development/python-modules/qiskit-ignis/default.nix b/pkgs/development/python-modules/qiskit-ignis/default.nix index 403fa0f05a9c05..996259f683b491 100644 --- a/pkgs/development/python-modules/qiskit-ignis/default.nix +++ b/pkgs/development/python-modules/qiskit-ignis/default.nix @@ -5,7 +5,7 @@ , python , numpy , qiskit-terra -, scikitlearn +, scikit-learn , scipy # Optional package inputs , withVisualization ? false @@ -44,7 +44,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy qiskit-terra - scikitlearn + scikit-learn scipy ] ++ lib.optionals (withCvx) [ cvxpy ] ++ lib.optionals (withVisualization) [ matplotlib ] diff --git a/pkgs/development/python-modules/ripser/default.nix b/pkgs/development/python-modules/ripser/default.nix index acd017a7a2e8dc..7bc7df0b8fd570 100644 --- a/pkgs/development/python-modules/ripser/default.nix +++ b/pkgs/development/python-modules/ripser/default.nix @@ -5,7 +5,7 @@ , cython , numpy , scipy -, scikitlearn +, scikit-learn , persim , pytest }: @@ -28,7 +28,7 @@ buildPythonPackage rec { cython numpy scipy - scikitlearn + scikit-learn persim ]; diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index f13fecc0855184..fe4cd4ea48ddb4 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -12,7 +12,7 @@ , pandas , scipy , hdmedians -, scikitlearn +, scikit-learn , coverage , python , isPy3k @@ -30,7 +30,7 @@ buildPythonPackage rec { buildInputs = [ cython ]; checkInputs = [ coverage ]; - propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy hdmedians scikitlearn ]; + propagatedBuildInputs = [ lockfile cachecontrol decorator ipython matplotlib natsort numpy pandas scipy hdmedians scikit-learn ]; # cython package not included for tests doCheck = false; diff --git a/pkgs/development/python-modules/scikitlearn/0.20.nix b/pkgs/development/python-modules/scikit-learn/0.20.nix similarity index 100% rename from pkgs/development/python-modules/scikitlearn/0.20.nix rename to pkgs/development/python-modules/scikit-learn/0.20.nix diff --git a/pkgs/development/python-modules/scikitlearn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix similarity index 100% rename from pkgs/development/python-modules/scikitlearn/default.nix rename to pkgs/development/python-modules/scikit-learn/default.nix diff --git a/pkgs/development/python-modules/scikit-optimize/default.nix b/pkgs/development/python-modules/scikit-optimize/default.nix index 0a5171f22fbfa6..3b7106ac4f2b9f 100644 --- a/pkgs/development/python-modules/scikit-optimize/default.nix +++ b/pkgs/development/python-modules/scikit-optimize/default.nix @@ -5,7 +5,7 @@ , matplotlib , numpy , scipy -, scikitlearn +, scikit-learn , pyaml , pytestCheckHook }: @@ -26,7 +26,7 @@ buildPythonPackage rec { matplotlib numpy scipy - scikitlearn + scikit-learn pyaml ]; diff --git a/pkgs/development/python-modules/scikit-tda/default.nix b/pkgs/development/python-modules/scikit-tda/default.nix index f6d573573b9c4a..bf3e1d1ef46945 100644 --- a/pkgs/development/python-modules/scikit-tda/default.nix +++ b/pkgs/development/python-modules/scikit-tda/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , numpy , scipy -, scikitlearn +, scikit-learn , matplotlib , numba , umap-learn @@ -32,7 +32,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn matplotlib numba umap-learn diff --git a/pkgs/development/python-modules/seqeval/default.nix b/pkgs/development/python-modules/seqeval/default.nix index 15322632ad7d74..9ed516e4d5c31d 100644 --- a/pkgs/development/python-modules/seqeval/default.nix +++ b/pkgs/development/python-modules/seqeval/default.nix @@ -2,7 +2,7 @@ , buildPythonPackage , fetchFromGitHub , numpy -, scikitlearn +, scikit-learn , perl , pytestCheckHook }: @@ -27,7 +27,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn ]; checkInputs = [ diff --git a/pkgs/development/python-modules/shap/default.nix b/pkgs/development/python-modules/shap/default.nix index 5600f4a6aa0f30..128dacfd55a8fb 100644 --- a/pkgs/development/python-modules/shap/default.nix +++ b/pkgs/development/python-modules/shap/default.nix @@ -5,7 +5,7 @@ , pytestCheckHook , numpy , scipy -, scikitlearn +, scikit-learn , pandas , tqdm , slicer @@ -30,7 +30,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy scipy - scikitlearn + scikit-learn pandas tqdm slicer diff --git a/pkgs/development/python-modules/sklearn-deap/default.nix b/pkgs/development/python-modules/sklearn-deap/default.nix index d973bc70bcdb3c..2530b9652032c2 100644 --- a/pkgs/development/python-modules/sklearn-deap/default.nix +++ b/pkgs/development/python-modules/sklearn-deap/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikitlearn, python }: +{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, numpy, scipy, deap, scikit-learn, python }: buildPythonPackage rec { pname = "sklearn-deap"; @@ -20,7 +20,7 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ numpy scipy deap scikitlearn ]; + propagatedBuildInputs = [ numpy scipy deap scikit-learn ]; checkPhase = '' ${python.interpreter} test.py diff --git a/pkgs/development/python-modules/skorch/default.nix b/pkgs/development/python-modules/skorch/default.nix index 3504557b5027f3..db3b8ed4312cd4 100644 --- a/pkgs/development/python-modules/skorch/default.nix +++ b/pkgs/development/python-modules/skorch/default.nix @@ -8,7 +8,7 @@ , numpy , pandas , pytorch -, scikitlearn +, scikit-learn , scipy , tabulate , tqdm @@ -23,7 +23,7 @@ buildPythonPackage rec { sha256 = "9910f97339e654c8d38e0075d87b735e69e5eb11db59c527fb36705b30c8d0a4"; }; - propagatedBuildInputs = [ numpy pytorch scikitlearn scipy tabulate tqdm ]; + propagatedBuildInputs = [ numpy pytorch scikit-learn scipy tabulate tqdm ]; checkInputs = [ pytest pytestcov flaky pandas pytestCheckHook ]; disabledTests = [ diff --git a/pkgs/development/python-modules/textacy/default.nix b/pkgs/development/python-modules/textacy/default.nix index 31b02e3f26414a..9f9fe685c9522d 100644 --- a/pkgs/development/python-modules/textacy/default.nix +++ b/pkgs/development/python-modules/textacy/default.nix @@ -9,7 +9,7 @@ , pyphen , pytest , requests -, scikitlearn +, scikit-learn , scipy , spacy , srsly @@ -35,7 +35,7 @@ buildPythonPackage rec { pyemd pyphen requests - scikitlearn + scikit-learn scipy spacy srsly diff --git a/pkgs/development/python-modules/umap-learn/default.nix b/pkgs/development/python-modules/umap-learn/default.nix index f888704e6a8c37..fcf96a715f15be 100644 --- a/pkgs/development/python-modules/umap-learn/default.nix +++ b/pkgs/development/python-modules/umap-learn/default.nix @@ -3,7 +3,7 @@ , fetchFromGitHub , nose , numpy -, scikitlearn +, scikit-learn , scipy , numba , pynndescent @@ -24,7 +24,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn scipy numba pynndescent diff --git a/pkgs/development/python-modules/vowpalwabbit/default.nix b/pkgs/development/python-modules/vowpalwabbit/default.nix index da13ad21026dc2..c4822113204371 100644 --- a/pkgs/development/python-modules/vowpalwabbit/default.nix +++ b/pkgs/development/python-modules/vowpalwabbit/default.nix @@ -11,7 +11,7 @@ , pygments , numpy , scipy -, scikitlearn }: +, scikit-learn }: buildPythonPackage rec { pname = "vowpalwabbit"; @@ -36,7 +36,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ numpy - scikitlearn + scikit-learn scipy ]; diff --git a/pkgs/development/python-modules/word2vec/default.nix b/pkgs/development/python-modules/word2vec/default.nix index 259566c8fc26f8..bda8f59d2ef457 100644 --- a/pkgs/development/python-modules/word2vec/default.nix +++ b/pkgs/development/python-modules/word2vec/default.nix @@ -4,7 +4,7 @@ , fetchzip , cython , numpy -, scikitlearn +, scikit-learn , six , setuptools_scm , gcc @@ -30,7 +30,7 @@ buildPythonPackage rec { nativeBuildInputs = [ setuptools_scm gcc ]; - propagatedBuildInputs = [ cython numpy scikitlearn six ]; + propagatedBuildInputs = [ cython numpy scikit-learn six ]; checkInputs = [ pytest pytestcov ]; diff --git a/pkgs/development/python-modules/xgboost/default.nix b/pkgs/development/python-modules/xgboost/default.nix index b113e2c370903a..4f02d72c9a1863 100644 --- a/pkgs/development/python-modules/xgboost/default.nix +++ b/pkgs/development/python-modules/xgboost/default.nix @@ -2,7 +2,7 @@ , pytestCheckHook , cmake , scipy -, scikitlearn +, scikit-learn , stdenv , xgboost , substituteAll @@ -22,7 +22,7 @@ buildPythonPackage { propagatedBuildInputs = [ scipy ]; checkInputs = [ pytestCheckHook - scikitlearn + scikit-learn pandas matplotlib graphviz diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3ecf4494ff4fe4..89d3bfc87e721d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7350,10 +7350,12 @@ in { scikitimage = callPackage ../development/python-modules/scikit-image { }; - scikitlearn = callPackage ../development/python-modules/scikitlearn { + scikit-learn = callPackage ../development/python-modules/scikit-learn { inherit (pkgs) gfortran glibcLocales; }; + scikitlearn = self.scikit-learn; + scikit-optimize = callPackage ../development/python-modules/scikit-optimize { }; scikits-odes = callPackage ../development/python-modules/scikits-odes { }; diff --git a/pkgs/top-level/python2-packages.nix b/pkgs/top-level/python2-packages.nix index 9eae7555ea45fd..221da6daa9aa20 100644 --- a/pkgs/top-level/python2-packages.nix +++ b/pkgs/top-level/python2-packages.nix @@ -524,7 +524,7 @@ with self; with super; { scandir = callPackage ../development/python-modules/scandir { }; - scikitlearn = callPackage ../development/python-modules/scikitlearn/0.20.nix { + scikit-learn = callPackage ../development/python-modules/scikit-learn/0.20.nix { inherit (pkgs) gfortran glibcLocales; }; From 0a1a14d13e7de8ef651575a8c7eb2099639e2ec7 Mon Sep 17 00:00:00 2001 From: DavHau Date: Sat, 15 May 2021 15:14:01 +0700 Subject: [PATCH 2/2] python3Packages.scikit-learn: enable parallel building and testing --- .../python-modules/scikit-learn/default.nix | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/scikit-learn/default.nix b/pkgs/development/python-modules/scikit-learn/default.nix index 7e9e37831e0db9..dfce61df6c6e0d 100644 --- a/pkgs/development/python-modules/scikit-learn/default.nix +++ b/pkgs/development/python-modules/scikit-learn/default.nix @@ -7,7 +7,8 @@ , glibcLocales , numpy , scipy -, pytest +, pytestCheckHook +, pytest-xdist , pillow , cython , joblib @@ -54,17 +55,30 @@ buildPythonPackage rec { joblib threadpoolctl ]; - checkInputs = [ pytest ]; + + checkInputs = [ pytestCheckHook pytest-xdist ]; LC_ALL="en_US.UTF-8"; + preBuild = '' + export SKLEARN_BUILD_PARALLEL=$NIX_BUILD_CORES + ''; + doCheck = !stdenv.isAarch64; + # Skip test_feature_importance_regression - does web fetch - checkPhase = '' + disabledTests = [ "test_feature_importance_regression" ]; + + pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" "--pyargs" "sklearn" ]; + + preCheck = '' cd $TMPDIR - HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn + export HOME=$TMPDIR + export OMP_NUM_THREADS=1 ''; + pythonImportsCheck = [ "sklearn" ]; + meta = with lib; { description = "A set of python modules for machine learning and data mining"; changelog = let