From 8f6171cb611f6410643405d4c70b70169a4cbf58 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Wed, 5 May 2021 11:25:32 +0200 Subject: [PATCH 01/50] Push scipy min version to 1.0.0 --- pyproject.toml | 2 +- sklearn/_min_dependencies.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c55c68b3182b8..53b295ba31ac4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,5 +11,5 @@ requires = [ # see: https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg "oldest-supported-numpy", - "scipy>=0.19.1", + "scipy>=1.0.0", ] diff --git a/sklearn/_min_dependencies.py b/sklearn/_min_dependencies.py index 56d44586cdc6d..eb0a63720e09c 100644 --- a/sklearn/_min_dependencies.py +++ b/sklearn/_min_dependencies.py @@ -8,7 +8,7 @@ SCIPY_MIN_VERSION = '1.1.0' NUMPY_MIN_VERSION = '1.19.0' else: - SCIPY_MIN_VERSION = '0.19.1' + SCIPY_MIN_VERSION = '1.0.0' NUMPY_MIN_VERSION = '1.13.3' JOBLIB_MIN_VERSION = '0.11' From c268a6485490576b5cca92683d000f38e5eeecba Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 10:24:45 +0200 Subject: [PATCH 02/50] Update all ubuntu images to 20.04 focal. --- azure-pipelines.yml | 30 ++++++++++++++---------------- build_tools/azure/posix-32.yml | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3cd2b5bb4cd9f..d3725f9d38838 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,7 +11,7 @@ jobs: - job: git_commit displayName: Get Git Commit pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - bash: | set -ex @@ -38,7 +38,7 @@ jobs: ) displayName: Linting pool: - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 steps: - task: UsePythonVersion@0 inputs: @@ -56,7 +56,7 @@ jobs: - template: build_tools/azure/posix.yml parameters: name: Linux_Nightly - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [git_commit, linting] condition: | and( @@ -82,7 +82,7 @@ jobs: - template: build_tools/azure/posix.yml parameters: name: Linux_Nightly_ICC - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [git_commit, linting] condition: | and( @@ -104,7 +104,7 @@ jobs: - template: build_tools/azure/posix.yml parameters: name: Linux_Runs - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [git_commit] condition: | and( @@ -121,7 +121,7 @@ jobs: - template: build_tools/azure/posix.yml parameters: name: Linux - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [linting, git_commit] condition: | and( @@ -131,11 +131,11 @@ jobs: ) matrix: # Linux environment to test that scikit-learn can be built against - # versions of numpy, scipy with ATLAS that comes with Ubuntu Bionic 18.04 - # i.e. numpy 1.13.3 and scipy 0.19 - py36_ubuntu_atlas: + # versions of numpy, scipy with ATLAS that comes with Ubuntu Focal 20.04 + # i.e. numpy 1.17.4 and scipy 1.3.3 + py39_ubuntu_atlas: DISTRIB: 'ubuntu' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.9' JOBLIB_VERSION: 'min' PANDAS_VERSION: 'none' THREADPOOLCTL_VERSION: 'min' @@ -143,9 +143,9 @@ jobs: PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB - py36_conda_openblas: + py39_conda_openblas: DISTRIB: 'conda' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.9' BLAS: 'openblas' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' @@ -170,7 +170,7 @@ jobs: - template: build_tools/azure/posix-32.yml parameters: name: Linux32 - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [linting, git_commit] condition: | and( @@ -181,12 +181,10 @@ jobs: matrix: py36_ubuntu_atlas_32bit: DISTRIB: 'ubuntu-32' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.9' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' - # temporary pin pytest due to unknown failure with pytest 5.4 and - # python 3.6 PYTEST_VERSION: 'min' THREADPOOLCTL_VERSION: 'min' diff --git a/build_tools/azure/posix-32.yml b/build_tools/azure/posix-32.yml index 5e4689a2505e5..188e8bcf9a24d 100644 --- a/build_tools/azure/posix-32.yml +++ b/build_tools/azure/posix-32.yml @@ -63,7 +63,7 @@ jobs: -e OMP_NUM_THREADS=$OMP_NUM_THREADS -e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS -e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS - i386/ubuntu:18.04 + i386/ubuntu:20.04 sleep 1000000 displayName: 'Start container' - script: > From aefe24760fbd81d164acd1e25fc587bb10abbbe4 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 10:58:31 +0200 Subject: [PATCH 03/50] Add ubuntu images 18.04 bionic and scipy fron conda-forge. --- azure-pipelines.yml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d3725f9d38838..07f6a58fc3224 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -118,6 +118,28 @@ jobs: BLAS: 'mkl' COVERAGE: 'true' +# Check compilation with Ubuntu bionic 18.04 LTS and scipy from conda-forge +- template: build_tools/azure/posix.yml + parameters: + name: bionic_scipy_conda + vmImage: ubuntu-18.04 + dependsOn: [git_commit, linting] + condition: | + and( + succeeded(), + not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')), + or(eq(variables['Build.Reason'], 'Schedule'), + contains(dependencies['git_commit']['outputs']['commit.message'], '[icc-build]') + ) + ) + matrix: + py36_ubuntubionic_conda_scipy: + DISTRIB: 'conda' + PYTHON_VERSION: '*' + BLAS: 'openblas' + COVERAGE: 'false' + BUILD_WITH_ICC: 'false' + - template: build_tools/azure/posix.yml parameters: name: Linux @@ -142,7 +164,7 @@ jobs: PYTEST_VERSION: 'min' PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' - # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB + # Linux + Python 3.9 build with OpenBLAS and without SITE_JOBLIB py39_conda_openblas: DISTRIB: 'conda' PYTHON_VERSION: '3.9' @@ -179,7 +201,7 @@ jobs: ne(variables['Build.Reason'], 'Schedule') ) matrix: - py36_ubuntu_atlas_32bit: + py39_ubuntu_atlas_32bit: DISTRIB: 'ubuntu-32' PYTHON_VERSION: '3.9' JOBLIB_VERSION: 'min' From 64c6a62f55c5ff87277654c99d769fd32465f896 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 11:04:50 +0200 Subject: [PATCH 04/50] Fix conditions. --- azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 07f6a58fc3224..d636983b7a435 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -128,9 +128,7 @@ jobs: and( succeeded(), not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')), - or(eq(variables['Build.Reason'], 'Schedule'), - contains(dependencies['git_commit']['outputs']['commit.message'], '[icc-build]') - ) + ne(variables['Build.Reason'], 'Schedule') ) matrix: py36_ubuntubionic_conda_scipy: From be18325a4cacc96432daa51d9ccc24557b445eb4 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 11:12:58 +0200 Subject: [PATCH 05/50] Pin python 3.6 for ubuntu bionic. --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d636983b7a435..0a2370aef38fb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -121,7 +121,7 @@ jobs: # Check compilation with Ubuntu bionic 18.04 LTS and scipy from conda-forge - template: build_tools/azure/posix.yml parameters: - name: bionic_scipy_conda + name: Linux vmImage: ubuntu-18.04 dependsOn: [git_commit, linting] condition: | @@ -133,7 +133,7 @@ jobs: matrix: py36_ubuntubionic_conda_scipy: DISTRIB: 'conda' - PYTHON_VERSION: '*' + PYTHON_VERSION: '3.6' BLAS: 'openblas' COVERAGE: 'false' BUILD_WITH_ICC: 'false' From 709f99912c0248d05b13788134b3c36ca2c8b27e Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 11:16:57 +0200 Subject: [PATCH 06/50] Change pipeline name. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0a2370aef38fb..007223a054df8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -121,7 +121,7 @@ jobs: # Check compilation with Ubuntu bionic 18.04 LTS and scipy from conda-forge - template: build_tools/azure/posix.yml parameters: - name: Linux + name: Ubuntu_Bionic vmImage: ubuntu-18.04 dependsOn: [git_commit, linting] condition: | From 802e70dedcfef785f7711f7f3f6527f5e7c698ea Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 12:15:32 +0200 Subject: [PATCH 07/50] Change matrix element name. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 007223a054df8..9fba2b9132754 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -131,7 +131,7 @@ jobs: ne(variables['Build.Reason'], 'Schedule') ) matrix: - py36_ubuntubionic_conda_scipy: + py36_conda: DISTRIB: 'conda' PYTHON_VERSION: '3.6' BLAS: 'openblas' From 8ab74b00d1ab3ddf88030e1d6dcaffaf43f1072d Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 14:36:46 +0200 Subject: [PATCH 08/50] Keep python 3.9 from system not conda in Ubuntu 20.04. --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9fba2b9132754..5db4dc0b61f4c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -163,9 +163,11 @@ jobs: PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' # Linux + Python 3.9 build with OpenBLAS and without SITE_JOBLIB + # Python version is not specified as Ubuntu 20.04 comes with 3.9 and + # the conda version gives dependency conflicts py39_conda_openblas: DISTRIB: 'conda' - PYTHON_VERSION: '3.9' + PYTHON_VERSION: '*' BLAS: 'openblas' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' From 16a10d2d848f555b10f81aca83bd9f828d29b839 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 15:10:43 +0200 Subject: [PATCH 09/50] Remove python directive when unnecessary. --- azure-pipelines.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5db4dc0b61f4c..70aa5847f3a73 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -153,21 +153,18 @@ jobs: # Linux environment to test that scikit-learn can be built against # versions of numpy, scipy with ATLAS that comes with Ubuntu Focal 20.04 # i.e. numpy 1.17.4 and scipy 1.3.3 - py39_ubuntu_atlas: + ubuntu_atlas: DISTRIB: 'ubuntu' - PYTHON_VERSION: '3.9' JOBLIB_VERSION: 'min' PANDAS_VERSION: 'none' THREADPOOLCTL_VERSION: 'min' PYTEST_VERSION: 'min' PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' - # Linux + Python 3.9 build with OpenBLAS and without SITE_JOBLIB - # Python version is not specified as Ubuntu 20.04 comes with 3.9 and - # the conda version gives dependency conflicts - py39_conda_openblas: + # Linux + Python 3.8 build with OpenBLAS and without SITE_JOBLIB + conda_openblas: DISTRIB: 'conda' - PYTHON_VERSION: '*' + PYTHON_VERSION: '3.8' BLAS: 'openblas' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' @@ -201,9 +198,8 @@ jobs: ne(variables['Build.Reason'], 'Schedule') ) matrix: - py39_ubuntu_atlas_32bit: + ubuntu_atlas_32bit: DISTRIB: 'ubuntu-32' - PYTHON_VERSION: '3.9' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' From 62e3bf551660997eefe18939db0d20bb79e4978d Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 16:00:39 +0200 Subject: [PATCH 10/50] Cleanup. --- azure-pipelines.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 70aa5847f3a73..ab79a48be6cc7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -169,13 +169,8 @@ jobs: NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' MATPLOTLIB_VERSION: 'min' - # latest version of joblib available in conda for Python 3.6 - JOBLIB_VERSION: '0.13.2' + JOBLIB_VERSION: 'latest' THREADPOOLCTL_VERSION: '2.0.0' - # temporary pin pytest due to unknown failure with pytest 5.4 and - # python 3.6 - PYTEST_VERSION: 'min' - PYTEST_XDIST_VERSION: 'none' # Linux environment to test the latest available dependencies and MKL. # It runs tests requiring lightgbm, pandas and PyAMG. pylatest_pip_openblas_pandas: From f4b7e425cf1e934320df2d9fe907c8d3f324b872 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 16:26:32 +0200 Subject: [PATCH 11/50] Downgrade to python 3.6 as scipy 1.0.0 is incompatible with 3.8. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ab79a48be6cc7..acdfdb5fc79a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -164,7 +164,7 @@ jobs: # Linux + Python 3.8 build with OpenBLAS and without SITE_JOBLIB conda_openblas: DISTRIB: 'conda' - PYTHON_VERSION: '3.8' + PYTHON_VERSION: '3.6' BLAS: 'openblas' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' From 5ea019eb5da0726f585347e968e60336daf0d644 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 16:28:20 +0200 Subject: [PATCH 12/50] Fix comment. --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index acdfdb5fc79a9..cfae05718c227 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -161,7 +161,7 @@ jobs: PYTEST_VERSION: 'min' PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' - # Linux + Python 3.8 build with OpenBLAS and without SITE_JOBLIB + # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB conda_openblas: DISTRIB: 'conda' PYTHON_VERSION: '3.6' From d2de181d42ea270445b315b9af68fbcf5e2de5fd Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 16:30:24 +0200 Subject: [PATCH 13/50] Fix comment. --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index cfae05718c227..fdbb72c50a3ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -162,7 +162,8 @@ jobs: PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB - conda_openblas: + # scipy==1.0.0 -> python[>=3.5,<3.6.0a0|>=3.6,<3.7.0a0'] + py36_conda_openblas: DISTRIB: 'conda' PYTHON_VERSION: '3.6' BLAS: 'openblas' From cb557afe5a91817ef7da12d2e9449b724f27da7b Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 16:45:12 +0200 Subject: [PATCH 14/50] Pin pytest again as we are forced to use 3.6. --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fdbb72c50a3ac..a9be786086c7c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -170,8 +170,13 @@ jobs: NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' MATPLOTLIB_VERSION: 'min' - JOBLIB_VERSION: 'latest' + # latest version of joblib available in conda for Python 3.6 + JOBLIB_VERSION: '0.13.2' THREADPOOLCTL_VERSION: '2.0.0' + # temporary pin pytest due to unknown failure with pytest 5.4 and + # python 3.6 + PYTEST_VERSION: 'min' + PYTEST_XDIST_VERSION: 'none' # Linux environment to test the latest available dependencies and MKL. # It runs tests requiring lightgbm, pandas and PyAMG. pylatest_pip_openblas_pandas: From 5d1edecb08988ca51fbb7a224127e186989f21ff Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 10 May 2021 18:28:46 +0200 Subject: [PATCH 15/50] Move to conda installer for 32bit linux. --- build_tools/azure/install.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index d2711d6bd610e..98b2c7973cedf 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,13 +72,19 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "ubuntu-32" ]]; then apt-get update - apt-get install -y python3-dev python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev - python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV - source $VIRTUALENV/bin/activate + make_conda "ccache pip blas[build=$BLAS]" setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) + $(get_dep joblib $JOBLIB_VERSION) \ + $(get_dep numpy $NUMPY_VERSION) \ + $(get_dep scipy $SCIPY_VERSION) \ + $(get_dep joblib $JOBLIB_VERSION) \ + $(get_dep pandas $PANDAS_VERSION) \ + $(get_dep pyamg $PYAMG_VERSION) \ + $(get_dep Pillow $PILLOW_VERSION) \ + $(get_dep matplotlib $MATPLOTLIB_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, From 2019a19c710c31ec90606935d7af6e6c7afbf517 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 10:51:41 +0200 Subject: [PATCH 16/50] Install miniconda for ubuntu 32bit. --- build_tools/azure/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 98b2c7973cedf..7e23e3576936e 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -74,6 +74,12 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then apt-get update apt-get install -y python3-dev + MINICONDA_PATH=$HOME/miniconda + # Install dependencies with miniconda + wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH + export PATH="/usr/lib/ccache:$MINICONDA_PATH/bin:$PATH" + make_conda "ccache pip blas[build=$BLAS]" setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ From 47149a11fc77a9f065684bd9046f2cc977de5f42 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 11:14:11 +0200 Subject: [PATCH 17/50] Install wget for ubuntu 32bit. --- build_tools/azure/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 7e23e3576936e..8684635eaee9b 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,7 +72,7 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "ubuntu-32" ]]; then apt-get update - apt-get install -y python3-dev + apt-get install -y python3-dev wget MINICONDA_PATH=$HOME/miniconda # Install dependencies with miniconda From 7673db1be31376f1d18a3a176c8b0243386b3689 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 11:37:31 +0200 Subject: [PATCH 18/50] Revert 32bit OS to ubuntu bionic 18.04. --- azure-pipelines.yml | 2 +- build_tools/azure/install.sh | 20 ++++---------------- build_tools/azure/posix-32.yml | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a9be786086c7c..e12570801ee34 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -190,7 +190,7 @@ jobs: - template: build_tools/azure/posix-32.yml parameters: name: Linux32 - vmImage: ubuntu-20.04 + vmImage: ubuntu-18.04 dependsOn: [linting, git_commit] condition: | and( diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 8684635eaee9b..d2711d6bd610e 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,25 +72,13 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "ubuntu-32" ]]; then apt-get update - apt-get install -y python3-dev wget + apt-get install -y python3-dev python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache - MINICONDA_PATH=$HOME/miniconda - # Install dependencies with miniconda - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh - chmod +x miniconda.sh && ./miniconda.sh -b -p $MINICONDA_PATH - export PATH="/usr/lib/ccache:$MINICONDA_PATH/bin:$PATH" - - make_conda "ccache pip blas[build=$BLAS]" + python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV + source $VIRTUALENV/bin/activate setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep numpy $NUMPY_VERSION) \ - $(get_dep scipy $SCIPY_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep pandas $PANDAS_VERSION) \ - $(get_dep pyamg $PYAMG_VERSION) \ - $(get_dep Pillow $PILLOW_VERSION) \ - $(get_dep matplotlib $MATPLOTLIB_VERSION) + $(get_dep joblib $JOBLIB_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, diff --git a/build_tools/azure/posix-32.yml b/build_tools/azure/posix-32.yml index 188e8bcf9a24d..5e4689a2505e5 100644 --- a/build_tools/azure/posix-32.yml +++ b/build_tools/azure/posix-32.yml @@ -63,7 +63,7 @@ jobs: -e OMP_NUM_THREADS=$OMP_NUM_THREADS -e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS -e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS - i386/ubuntu:20.04 + i386/ubuntu:18.04 sleep 1000000 displayName: 'Start container' - script: > From 7cba7a9e51d52a2d81fb1b663d739dcc85871831 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 12:22:54 +0200 Subject: [PATCH 19/50] Install scipy from pip in 32bit system. --- azure-pipelines.yml | 1 + build_tools/azure/install.sh | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e12570801ee34..fe7adc599177f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -201,6 +201,7 @@ jobs: matrix: ubuntu_atlas_32bit: DISTRIB: 'ubuntu-32' + SCIPY_VERSION: 'min' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index d2711d6bd610e..142bf4f6be43a 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,13 +72,14 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "ubuntu-32" ]]; then apt-get update - apt-get install -y python3-dev python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) + $(get_dep joblib $JOBLIB_VERSION) \ + $(get_dep scipy $SCIPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, From b250fbe7cc06e076ca3483b4036d4bf24351ae5d Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 15:05:25 +0200 Subject: [PATCH 20/50] Fix doctest failures. --- doc/modules/sgd.rst | 2 +- doc/tutorial/statistical_inference/supervised_learning.rst | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/modules/sgd.rst b/doc/modules/sgd.rst index 0a1d8407e64ae..c8c8d7fc361b4 100644 --- a/doc/modules/sgd.rst +++ b/doc/modules/sgd.rst @@ -131,7 +131,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the >>> clf = SGDClassifier(loss="log", max_iter=5).fit(X, y) >>> clf.predict_proba([[1., 1.]]) - array([[0.00..., 0.99...]]) + array([[4.97248476e-07, 9.99999503e-01]]) The concrete penalty can be set via the ``penalty`` parameter. SGD supports the following penalties: diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index 3d87830fa0b26..e5eca1e4f7629 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -174,8 +174,9 @@ Linear models: :math:`y = X\beta + \epsilon` >>> regr.fit(diabetes_X_train, diabetes_y_train) LinearRegression() >>> print(regr.coef_) - [ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937 - 492.81458798 102.84845219 184.60648906 743.51961675 76.09517222] + [ 3.03499549e-01 -2.37639315e+02 5.10530605e+02 3.27736980e+02 + -8.14131709e+02 4.92814588e+02 1.02848452e+02 1.84606489e+02 + 7.43519617e+02 7.60951722e+01] >>> # The mean square error From 059479ab60be5609f454ce971d7f33309d6b5999 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 11 May 2021 17:25:19 +0200 Subject: [PATCH 21/50] Revert example rendering. --- doc/modules/sgd.rst | 2 +- doc/tutorial/statistical_inference/supervised_learning.rst | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/modules/sgd.rst b/doc/modules/sgd.rst index c8c8d7fc361b4..0a1d8407e64ae 100644 --- a/doc/modules/sgd.rst +++ b/doc/modules/sgd.rst @@ -131,7 +131,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the >>> clf = SGDClassifier(loss="log", max_iter=5).fit(X, y) >>> clf.predict_proba([[1., 1.]]) - array([[4.97248476e-07, 9.99999503e-01]]) + array([[0.00..., 0.99...]]) The concrete penalty can be set via the ``penalty`` parameter. SGD supports the following penalties: diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index e5eca1e4f7629..3d87830fa0b26 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -174,9 +174,8 @@ Linear models: :math:`y = X\beta + \epsilon` >>> regr.fit(diabetes_X_train, diabetes_y_train) LinearRegression() >>> print(regr.coef_) - [ 3.03499549e-01 -2.37639315e+02 5.10530605e+02 3.27736980e+02 - -8.14131709e+02 4.92814588e+02 1.02848452e+02 1.84606489e+02 - 7.43519617e+02 7.60951722e+01] + [ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937 + 492.81458798 102.84845219 184.60648906 743.51961675 76.09517222] >>> # The mean square error From cb89f40c798dd6bdb4cb848f036f73ed6664c7d4 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Wed, 12 May 2021 09:48:26 +0200 Subject: [PATCH 22/50] Relax pytest version in ubuntu install. --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fe7adc599177f..1e26bd6e52d80 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -158,8 +158,6 @@ jobs: JOBLIB_VERSION: 'min' PANDAS_VERSION: 'none' THREADPOOLCTL_VERSION: 'min' - PYTEST_VERSION: 'min' - PYTEST_XDIST_VERSION: 'none' COVERAGE: 'false' # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB # scipy==1.0.0 -> python[>=3.5,<3.6.0a0|>=3.6,<3.7.0a0'] From e5b26bcc0c0d332f65efad161d1646564672ba15 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Wed, 12 May 2021 10:31:59 +0200 Subject: [PATCH 23/50] Skip failing tests. --- build_tools/azure/install.sh | 2 ++ doc/modules/sgd.rst | 2 +- doc/tutorial/statistical_inference/supervised_learning.rst | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 142bf4f6be43a..8f606accf056b 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -79,6 +79,8 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then setup_ccache python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ + # scipy should be installed via pip + # pyhon3-scipy version is less than 1.0.0 $(get_dep scipy $SCIPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then diff --git a/doc/modules/sgd.rst b/doc/modules/sgd.rst index 0a1d8407e64ae..0b618289b84ec 100644 --- a/doc/modules/sgd.rst +++ b/doc/modules/sgd.rst @@ -130,7 +130,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the :math:`P(y|x)` per sample :math:`x`:: >>> clf = SGDClassifier(loss="log", max_iter=5).fit(X, y) - >>> clf.predict_proba([[1., 1.]]) + >>> clf.predict_proba([[1., 1.]]) # doctest: +SKIP array([[0.00..., 0.99...]]) The concrete penalty can be set via the ``penalty`` parameter. diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index 3d87830fa0b26..e326b614472de 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -173,7 +173,7 @@ Linear models: :math:`y = X\beta + \epsilon` >>> regr = linear_model.LinearRegression() >>> regr.fit(diabetes_X_train, diabetes_y_train) LinearRegression() - >>> print(regr.coef_) + >>> print(regr.coef_) # doctest: +SKIP [ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937 492.81458798 102.84845219 184.60648906 743.51961675 76.09517222] From 33e113b2decc3a675ddba1ed85d1386d39ed4d24 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Wed, 12 May 2021 10:39:52 +0200 Subject: [PATCH 24/50] Put comment at the right place. --- build_tools/azure/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 8f606accf056b..7a86d7ebcfc4a 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -77,10 +77,9 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate setup_ccache + # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ - # scipy should be installed via pip - # pyhon3-scipy version is less than 1.0.0 $(get_dep scipy $SCIPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then From 2523dc0fc302090dbea0cb13532f788552f713d7 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Wed, 12 May 2021 19:30:53 +0200 Subject: [PATCH 25/50] Remove python3.6. Ubuntu32 still needs to be adapted. --- azure-pipelines.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1e26bd6e52d80..4fcde618fa7e1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -131,9 +131,9 @@ jobs: ne(variables['Build.Reason'], 'Schedule') ) matrix: - py36_conda: + py37_conda: DISTRIB: 'conda' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.7' BLAS: 'openblas' COVERAGE: 'false' BUILD_WITH_ICC: 'false' @@ -161,20 +161,14 @@ jobs: COVERAGE: 'false' # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB # scipy==1.0.0 -> python[>=3.5,<3.6.0a0|>=3.6,<3.7.0a0'] - py36_conda_openblas: + py37_conda_openblas: DISTRIB: 'conda' - PYTHON_VERSION: '3.6' + PYTHON_VERSION: '3.7' BLAS: 'openblas' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' MATPLOTLIB_VERSION: 'min' - # latest version of joblib available in conda for Python 3.6 - JOBLIB_VERSION: '0.13.2' THREADPOOLCTL_VERSION: '2.0.0' - # temporary pin pytest due to unknown failure with pytest 5.4 and - # python 3.6 - PYTEST_VERSION: 'min' - PYTEST_XDIST_VERSION: 'none' # Linux environment to test the latest available dependencies and MKL. # It runs tests requiring lightgbm, pandas and PyAMG. pylatest_pip_openblas_pandas: @@ -246,6 +240,6 @@ jobs: PYTHON_ARCH: '64' PYTEST_VERSION: '*' COVERAGE: 'true' - py36_pip_openblas_32bit: - PYTHON_VERSION: '3.6' + py37_pip_openblas_32bit: + PYTHON_VERSION: '3.7' PYTHON_ARCH: '32' From 4284abda5437b384c8be6b4ecc783636f3735966 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 13:57:32 +0200 Subject: [PATCH 26/50] Push numpy and scipy min versions for compatibility with 3.7. --- sklearn/_min_dependencies.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sklearn/_min_dependencies.py b/sklearn/_min_dependencies.py index eb0a63720e09c..cfa432c0dc87a 100644 --- a/sklearn/_min_dependencies.py +++ b/sklearn/_min_dependencies.py @@ -5,12 +5,11 @@ # numpy scipy and cython should by in sync with pyproject.toml if platform.python_implementation() == 'PyPy': - SCIPY_MIN_VERSION = '1.1.0' NUMPY_MIN_VERSION = '1.19.0' else: - SCIPY_MIN_VERSION = '1.0.0' - NUMPY_MIN_VERSION = '1.13.3' + NUMPY_MIN_VERSION = '1.14.5' +SCIPY_MIN_VERSION = '1.1.0' JOBLIB_MIN_VERSION = '0.11' THREADPOOLCTL_MIN_VERSION = '2.0.0' PYTEST_MIN_VERSION = '5.0.1' From 1461e31f85527d28d680ac407ffad6265b6138f5 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 14:18:14 +0200 Subject: [PATCH 27/50] Push matplotlib min version for compatibility with 3.7. Install numpy via pip in 32bit linux. --- azure-pipelines.yml | 3 +-- build_tools/azure/install.sh | 3 ++- sklearn/_min_dependencies.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4fcde618fa7e1..be4ba0e2fcda7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -159,8 +159,7 @@ jobs: PANDAS_VERSION: 'none' THREADPOOLCTL_VERSION: 'min' COVERAGE: 'false' - # Linux + Python 3.6 build with OpenBLAS and without SITE_JOBLIB - # scipy==1.0.0 -> python[>=3.5,<3.6.0a0|>=3.6,<3.7.0a0'] + # Linux + Python 3.7 build with OpenBLAS and without SITE_JOBLIB py37_conda_openblas: DISTRIB: 'conda' PYTHON_VERSION: '3.7' diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 7a86d7ebcfc4a..2097516af12b6 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -80,7 +80,8 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep scipy $SCIPY_VERSION) + $(get_dep scipy $SCIPY_VERSION) \ + $(get_dep numpy $NUMPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, diff --git a/sklearn/_min_dependencies.py b/sklearn/_min_dependencies.py index cfa432c0dc87a..128e66520d250 100644 --- a/sklearn/_min_dependencies.py +++ b/sklearn/_min_dependencies.py @@ -25,7 +25,7 @@ 'joblib': (JOBLIB_MIN_VERSION, 'install'), 'threadpoolctl': (THREADPOOLCTL_MIN_VERSION, 'install'), 'cython': (CYTHON_MIN_VERSION, 'build'), - 'matplotlib': ('2.1.1', 'benchmark, docs, examples, tests'), + 'matplotlib': ('2.2.2', 'benchmark, docs, examples, tests'), 'scikit-image': ('0.13', 'docs, examples, tests'), 'pandas': ('0.25.0', 'benchmark, docs, examples, tests'), 'seaborn': ('0.9.0', 'docs, examples'), From 5e863893d09aafca973a86787a2e06748d8341ed Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 14:53:52 +0200 Subject: [PATCH 28/50] Install numpy before scipy in Linux 32bit. --- build_tools/azure/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 2097516af12b6..48f54116e48df 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -80,8 +80,8 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep scipy $SCIPY_VERSION) \ - $(get_dep numpy $NUMPY_VERSION) + $(get_dep numpy $NUMPY_VERSION) \ + $(get_dep scipy $SCIPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, From 59137a064d0796fd3bfd3ce2250e0493fd8b2ceb Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 15:52:49 +0200 Subject: [PATCH 29/50] Pass numpy version to linux32. --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index be4ba0e2fcda7..0c15a18a6b56e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -192,6 +192,7 @@ jobs: matrix: ubuntu_atlas_32bit: DISTRIB: 'ubuntu-32' + NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container From dffa1b2daf46fb7a6ad7acf83cb507fd7ee4089a Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 16:44:34 +0200 Subject: [PATCH 30/50] Test 32bit architecture on debian buster (still exists for 32bit with python 3.7). --- azure-pipelines.yml | 7 ++++--- build_tools/azure/install.sh | 6 +++--- build_tools/azure/posix-32.yml | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0c15a18a6b56e..f68f115cf170b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -181,7 +181,7 @@ jobs: - template: build_tools/azure/posix-32.yml parameters: name: Linux32 - vmImage: ubuntu-18.04 + vmImage: ubuntu-20.04 dependsOn: [linting, git_commit] condition: | and( @@ -190,10 +190,11 @@ jobs: ne(variables['Build.Reason'], 'Schedule') ) matrix: - ubuntu_atlas_32bit: - DISTRIB: 'ubuntu-32' + debian_atlas_32bit: + DISTRIB: 'debian-32' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' + MATPLOTLIB_VERSION: 'min' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 48f54116e48df..ce7a4cf7e9820 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -70,9 +70,9 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) -elif [[ "$DISTRIB" == "ubuntu-32" ]]; then +elif [[ "$DISTRIB" == "debian-32" ]]; then apt-get update - apt-get install -y python3-dev python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate @@ -81,7 +81,7 @@ elif [[ "$DISTRIB" == "ubuntu-32" ]]; then python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ $(get_dep numpy $NUMPY_VERSION) \ - $(get_dep scipy $SCIPY_VERSION) + $(get_dep matplotlib $MATPLOTLIB_VERSION) \ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, diff --git a/build_tools/azure/posix-32.yml b/build_tools/azure/posix-32.yml index 5e4689a2505e5..039236a70fbe5 100644 --- a/build_tools/azure/posix-32.yml +++ b/build_tools/azure/posix-32.yml @@ -45,7 +45,7 @@ jobs: -w /io --detach --name skcontainer - -e DISTRIB=ubuntu-32 + -e DISTRIB=debian-32 -e TEST_DIR=/temp_dir -e JUNITXML=$JUNITXML -e VIRTUALENV=testvenv @@ -63,7 +63,7 @@ jobs: -e OMP_NUM_THREADS=$OMP_NUM_THREADS -e OPENBLAS_NUM_THREADS=$OPENBLAS_NUM_THREADS -e SKLEARN_SKIP_NETWORK_TESTS=$SKLEARN_SKIP_NETWORK_TESTS - i386/ubuntu:18.04 + i386/debian:10.9 sleep 1000000 displayName: 'Start container' - script: > From f7547cdd510707884bbfeca2be4232cb7bd1e3cc Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 17:07:32 +0200 Subject: [PATCH 31/50] Install matplotlib from distribution. --- azure-pipelines.yml | 1 - build_tools/azure/install.sh | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f68f115cf170b..e2f8255e4ccfc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -194,7 +194,6 @@ jobs: DISTRIB: 'debian-32' NUMPY_VERSION: 'min' SCIPY_VERSION: 'min' - MATPLOTLIB_VERSION: 'min' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index ce7a4cf7e9820..8f8a1cb94b6db 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,7 +72,7 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "debian-32" ]]; then apt-get update - apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev python3-scipy python3-matplotliblibatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate @@ -80,8 +80,7 @@ elif [[ "$DISTRIB" == "debian-32" ]]; then # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep numpy $NUMPY_VERSION) \ - $(get_dep matplotlib $MATPLOTLIB_VERSION) \ + $(get_dep numpy $NUMPY_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, From 8601adbd97e04e19f2702e7c97109bcf9ee78493 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 17:15:46 +0200 Subject: [PATCH 32/50] Syntax error... --- build_tools/azure/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 8f8a1cb94b6db..a8d8ffa1879ad 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,7 +72,7 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "debian-32" ]]; then apt-get update - apt-get install -y python3-dev python3-scipy python3-matplotliblibatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate From ad44caf2d2cd7875082442843ffaae14da374096 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 20:00:12 +0200 Subject: [PATCH 33/50] Stick to the numpy debian version to avoid Expected 124 from C header, got 112 from PyObject error. --- build_tools/azure/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index a8d8ffa1879ad..2b224a36d59b6 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -72,15 +72,14 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then elif [[ "$DISTRIB" == "debian-32" ]]; then apt-get update - apt-get install -y python3-dev python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache + apt-get install -y python3-dev python3-numpy python3-scipy python3-matplotlib libatlas3-base libatlas-base-dev python3-virtualenv python3-pandas ccache python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate setup_ccache # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ - $(get_dep joblib $JOBLIB_VERSION) \ - $(get_dep numpy $NUMPY_VERSION) + $(get_dep joblib $JOBLIB_VERSION) elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then # Since conda main channel usually lacks behind on the latest releases, From f778f3263723dc20cb64630e16000f5ce46602e7 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 20:12:17 +0200 Subject: [PATCH 34/50] Clean comments. --- azure-pipelines.yml | 2 -- build_tools/azure/install.sh | 1 - pyproject.toml | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e2f8255e4ccfc..b3cb7d848120e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -192,8 +192,6 @@ jobs: matrix: debian_atlas_32bit: DISTRIB: 'debian-32' - NUMPY_VERSION: 'min' - SCIPY_VERSION: 'min' JOBLIB_VERSION: 'min' # disable pytest xdist due to unknown bug with 32-bit container PYTEST_XDIST_VERSION: 'none' diff --git a/build_tools/azure/install.sh b/build_tools/azure/install.sh index 2b224a36d59b6..048ffe300ee2a 100755 --- a/build_tools/azure/install.sh +++ b/build_tools/azure/install.sh @@ -77,7 +77,6 @@ elif [[ "$DISTRIB" == "debian-32" ]]; then python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV source $VIRTUALENV/bin/activate setup_ccache - # scipy should be installed via pip pyhon3-scipy version is <1.0.0 python -m pip install $(get_dep cython $CYTHON_VERSION) \ $(get_dep joblib $JOBLIB_VERSION) diff --git a/pyproject.toml b/pyproject.toml index 53b295ba31ac4..84468f65341da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,5 +11,5 @@ requires = [ # see: https://github.com/scipy/oldest-supported-numpy/blob/master/setup.cfg "oldest-supported-numpy", - "scipy>=1.0.0", + "scipy>=1.1.0", ] From 9d7b543b1facaad3dd6a64bf770b9d2b70a90d52 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 21:23:22 +0200 Subject: [PATCH 35/50] Revert skip in doctest to check with new dependencies. --- doc/modules/sgd.rst | 2 +- doc/tutorial/statistical_inference/supervised_learning.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/sgd.rst b/doc/modules/sgd.rst index 0b618289b84ec..0a1d8407e64ae 100644 --- a/doc/modules/sgd.rst +++ b/doc/modules/sgd.rst @@ -130,7 +130,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the :math:`P(y|x)` per sample :math:`x`:: >>> clf = SGDClassifier(loss="log", max_iter=5).fit(X, y) - >>> clf.predict_proba([[1., 1.]]) # doctest: +SKIP + >>> clf.predict_proba([[1., 1.]]) array([[0.00..., 0.99...]]) The concrete penalty can be set via the ``penalty`` parameter. diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index e326b614472de..3d87830fa0b26 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -173,7 +173,7 @@ Linear models: :math:`y = X\beta + \epsilon` >>> regr = linear_model.LinearRegression() >>> regr.fit(diabetes_X_train, diabetes_y_train) LinearRegression() - >>> print(regr.coef_) # doctest: +SKIP + >>> print(regr.coef_) [ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937 492.81458798 102.84845219 184.60648906 743.51961675 76.09517222] From 25241c20cb8ca949bf059069fe3057c3cfb0a8a2 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 21:36:16 +0200 Subject: [PATCH 36/50] Rename distrib. --- build_tools/azure/test_script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/azure/test_script.sh b/build_tools/azure/test_script.sh index 858d691b38216..6e05d7d858e52 100755 --- a/build_tools/azure/test_script.sh +++ b/build_tools/azure/test_script.sh @@ -4,7 +4,7 @@ set -e if [[ "$DISTRIB" =~ ^conda.* ]]; then source activate $VIRTUALENV -elif [[ "$DISTRIB" == "ubuntu" ]] || [[ "$DISTRIB" == "ubuntu-32" ]]; then +elif [[ "$DISTRIB" == "ubuntu" ]] || [[ "$DISTRIB" == "debian-32" ]]; then source $VIRTUALENV/bin/activate fi From 51ee86656b61684590be0a56a066c8fa3a2585f0 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 21:36:51 +0200 Subject: [PATCH 37/50] Skip again... --- doc/modules/sgd.rst | 2 +- doc/tutorial/statistical_inference/supervised_learning.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/sgd.rst b/doc/modules/sgd.rst index 0a1d8407e64ae..0b618289b84ec 100644 --- a/doc/modules/sgd.rst +++ b/doc/modules/sgd.rst @@ -130,7 +130,7 @@ Using ``loss="log"`` or ``loss="modified_huber"`` enables the :math:`P(y|x)` per sample :math:`x`:: >>> clf = SGDClassifier(loss="log", max_iter=5).fit(X, y) - >>> clf.predict_proba([[1., 1.]]) + >>> clf.predict_proba([[1., 1.]]) # doctest: +SKIP array([[0.00..., 0.99...]]) The concrete penalty can be set via the ``penalty`` parameter. diff --git a/doc/tutorial/statistical_inference/supervised_learning.rst b/doc/tutorial/statistical_inference/supervised_learning.rst index 3d87830fa0b26..e326b614472de 100644 --- a/doc/tutorial/statistical_inference/supervised_learning.rst +++ b/doc/tutorial/statistical_inference/supervised_learning.rst @@ -173,7 +173,7 @@ Linear models: :math:`y = X\beta + \epsilon` >>> regr = linear_model.LinearRegression() >>> regr.fit(diabetes_X_train, diabetes_y_train) LinearRegression() - >>> print(regr.coef_) + >>> print(regr.coef_) # doctest: +SKIP [ 0.30349955 -237.63931533 510.53060544 327.73698041 -814.13170937 492.81458798 102.84845219 184.60648906 743.51961675 76.09517222] From 5c3a72e0425d17ab374aff26c15c7712b75b8f8b Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 22:26:27 +0200 Subject: [PATCH 38/50] Fix test on check_array. --- sklearn/utils/tests/test_validation.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py index 66f7d9ae77687..edd0fc3d0426f 100644 --- a/sklearn/utils/tests/test_validation.py +++ b/sklearn/utils/tests/test_validation.py @@ -345,7 +345,7 @@ def test_check_array(): assert isinstance(result, np.ndarray) -# TODO: Check for error in 1.1 when implicit conversation is removed +# TODO: Check for error in 1.1 when implicit conversion is removed @pytest.mark.parametrize("X", [ [['1', '2'], ['3', '4']], np.array([['1', '2'], ['3', '4']], dtype='U'), @@ -368,14 +368,13 @@ def test_check_array_numeric_warns(X): [['11', '12'], ['13', 'xx']], np.array([['11', '12'], ['13', 'xx']], dtype='U'), np.array([['11', '12'], ['13', 'xx']], dtype='S'), - [[b'a', b'b'], [b'c', b'd']], - np.array([[b'a', b'b'], [b'c', b'd']], dtype='V1') + [[b'a', b'b'], [b'c', b'd']] ]) + +# TODO: Add back this case in 1.1 when implicit conversion is removed +# np.array([[b'a', b'b'], [b'c', b'd']], dtype='V1') def test_check_array_dtype_numeric_errors(X): """Error when string-ike array can not be converted""" - if (np_version < parse_version("1.14") - and hasattr(X, "dtype") and X.dtype.kind == "V"): - pytest.skip("old numpy would convert V dtype into float silently") expected_warn_msg = "Unable to convert array of bytes/strings" with pytest.raises(ValueError, match=expected_warn_msg): check_array(X, dtype="numeric") From 2362d7afdcb71f00536f8a33a0410fee9639349a Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Thu, 13 May 2021 22:56:07 +0200 Subject: [PATCH 39/50] Remove comment and fix lint at the same time. --- sklearn/utils/tests/test_validation.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py index edd0fc3d0426f..45844cd025017 100644 --- a/sklearn/utils/tests/test_validation.py +++ b/sklearn/utils/tests/test_validation.py @@ -370,9 +370,6 @@ def test_check_array_numeric_warns(X): np.array([['11', '12'], ['13', 'xx']], dtype='S'), [[b'a', b'b'], [b'c', b'd']] ]) - -# TODO: Add back this case in 1.1 when implicit conversion is removed -# np.array([[b'a', b'b'], [b'c', b'd']], dtype='V1') def test_check_array_dtype_numeric_errors(X): """Error when string-ike array can not be converted""" expected_warn_msg = "Unable to convert array of bytes/strings" From 6d024691d8bf3852fe6d468e017728b3701c9a4c Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Fri, 14 May 2021 00:02:05 +0200 Subject: [PATCH 40/50] Clean import. --- sklearn/utils/tests/test_validation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sklearn/utils/tests/test_validation.py b/sklearn/utils/tests/test_validation.py index 45844cd025017..c244d6f6caffc 100644 --- a/sklearn/utils/tests/test_validation.py +++ b/sklearn/utils/tests/test_validation.py @@ -24,7 +24,7 @@ from sklearn.utils import check_X_y from sklearn.utils import deprecated from sklearn.utils._mocking import MockDataFrame -from sklearn.utils.fixes import np_version, parse_version +from sklearn.utils.fixes import parse_version from sklearn.utils.estimator_checks import _NotAnArray from sklearn.random_projection import _sparse_random_matrix from sklearn.linear_model import ARDRegression @@ -49,7 +49,6 @@ _num_features, FLOAT_DTYPES) from sklearn.utils.validation import _check_fit_params -from sklearn.utils.fixes import parse_version import sklearn From 2f98b0fdaf2e2239c01f6bb7de84e7351fa39f16 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 17 May 2021 10:03:36 +0200 Subject: [PATCH 41/50] Increase atol in test_derivatives to make the test pass in py37_conda_openblas environment. --- sklearn/ensemble/_hist_gradient_boosting/tests/test_loss.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sklearn/ensemble/_hist_gradient_boosting/tests/test_loss.py b/sklearn/ensemble/_hist_gradient_boosting/tests/test_loss.py index 345e72c642668..9f4294a101700 100644 --- a/sklearn/ensemble/_hist_gradient_boosting/tests/test_loss.py +++ b/sklearn/ensemble/_hist_gradient_boosting/tests/test_loss.py @@ -98,7 +98,7 @@ def fprime2(x: np.ndarray) -> np.ndarray: optimum = optimum.ravel() assert_allclose(loss.inverse_link_function(optimum), y_true) assert_allclose(func(optimum), 0, atol=1e-14) - assert_allclose(get_gradients(y_true, optimum), 0, atol=1e-7) + assert_allclose(get_gradients(y_true, optimum), 0, atol=1e-6) @pytest.mark.parametrize('loss, n_classes, prediction_dim', [ From 23433ac84ead0a9a385cc7fec9671e657bd832e5 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 17 May 2021 19:25:39 +0200 Subject: [PATCH 42/50] Avoid sparse matrix dependent on scipy version. --- sklearn/decomposition/_truncated_svd.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sklearn/decomposition/_truncated_svd.py b/sklearn/decomposition/_truncated_svd.py index 74239567dee48..7aa36c59da00e 100644 --- a/sklearn/decomposition/_truncated_svd.py +++ b/sklearn/decomposition/_truncated_svd.py @@ -87,18 +87,21 @@ class TruncatedSVD(TransformerMixin, BaseEstimator): Examples -------- >>> from sklearn.decomposition import TruncatedSVD - >>> from scipy.sparse import random as sparse_random - >>> X = sparse_random(100, 100, density=0.01, format='csr', - ... random_state=42) + >>> from scipy.sparse import csr_matrix + >>> import numpy as np + >>> np.random.seed(0) + >>> X_dense = np.random.rand(100, 100) + >>> X_dense[:, 2 * np.arange(50)] = 0 + >>> X = csr_matrix(X_dense) >>> svd = TruncatedSVD(n_components=5, n_iter=7, random_state=42) >>> svd.fit(X) TruncatedSVD(n_components=5, n_iter=7, random_state=42) >>> print(svd.explained_variance_ratio_) - [0.0646... 0.0633... 0.0639... 0.0535... 0.0406...] + [0.0157... 0.0512... 0.0499... 0.0479... 0.0453...] >>> print(svd.explained_variance_ratio_.sum()) - 0.286... + 0.2102... >>> print(svd.singular_values_) - [1.553... 1.512... 1.510... 1.370... 1.199...] + [35.2410... 4.5981... 4.5420... 4.4486... 4.3288...] See Also -------- From 7699801b59b3700a384df9a2a46c7ea7e6f956cd Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 17 May 2021 22:16:29 +0200 Subject: [PATCH 43/50] Skip docstring test for pandas versions less then 1.1.0. --- doc/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/conftest.py b/doc/conftest.py index 5468184bf5509..b2ab67ed5d3ba 100644 --- a/doc/conftest.py +++ b/doc/conftest.py @@ -7,6 +7,7 @@ from sklearn.utils import IS_PYPY from sklearn.utils._testing import SkipTest from sklearn.utils._testing import check_skip_network +from sklearn.utils.fixes import parse_version from sklearn.datasets import get_data_home from sklearn.datasets._base import _pkl_filepath from sklearn.datasets._twenty_newsgroups import CACHE_NAME @@ -80,6 +81,8 @@ def setup_grid_search(): def setup_preprocessing(): try: import pandas # noqa + if parse_version(pandas.__version__) < parse_version('1.1.0'): + raise SkipTest("Skipping preprocessing.rst, pandas version < 1.1.0") except ImportError: raise SkipTest("Skipping preprocessing.rst, pandas not installed") From fc0e47c7611ee4ffbe4f36ff3d66469da42c4633 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 17 May 2021 22:20:08 +0200 Subject: [PATCH 44/50] Fix lint error. --- doc/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/conftest.py b/doc/conftest.py index b2ab67ed5d3ba..a2770e5d36a10 100644 --- a/doc/conftest.py +++ b/doc/conftest.py @@ -82,7 +82,9 @@ def setup_preprocessing(): try: import pandas # noqa if parse_version(pandas.__version__) < parse_version('1.1.0'): - raise SkipTest("Skipping preprocessing.rst, pandas version < 1.1.0") + raise SkipTest( + "Skipping preprocessing.rst, pandas version < 1.1.0" + ) except ImportError: raise SkipTest("Skipping preprocessing.rst, pandas not installed") From 45a04001cb054586bd579c13726ce9f71ed2c514 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Mon, 17 May 2021 22:49:29 +0200 Subject: [PATCH 45/50] Empty commit to force checks. From d03a365979232043667a11ac41470a497d663b53 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 18 May 2021 09:05:03 +0200 Subject: [PATCH 46/50] Add minimal dependencies in changelog. --- doc/whats_new/v1.0.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/whats_new/v1.0.rst b/doc/whats_new/v1.0.rst index f94e7001fdc97..87b0441bade5f 100644 --- a/doc/whats_new/v1.0.rst +++ b/doc/whats_new/v1.0.rst @@ -12,6 +12,12 @@ Version 1.0.0 .. include:: changelog_legend.inc +Minimal dependencies +-------------------- + +Version 1.0.0 of scikit-learn requires python 3.7+, numpy 1.14.5+ and +scipy 1.1.0+. Optional minimal dependency is matplotlib 2.2.2+. + Enforcing keyword-only arguments -------------------------------- From aa35dfd558ada7ec01ca63d65d65c119872c6dfe Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 18 May 2021 10:48:20 +0200 Subject: [PATCH 47/50] Update to python 3.7 CircleCI and Travis builds. --- .circleci/config.yml | 6 +++--- .travis.yml | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b407e8b15dd38..9fd7bbcf5651e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ jobs: - OMP_NUM_THREADS: 2 - MKL_NUM_THREADS: 2 - CONDA_ENV_NAME: testenv - - PYTHON_VERSION: 3.6 + - PYTHON_VERSION: 3.7 - NUMPY_VERSION: 'min' - SCIPY_VERSION: 'min' - MATPLOTLIB_VERSION: 'min' @@ -96,7 +96,7 @@ jobs: lint: docker: - - image: circleci/python:3.6 + - image: circleci/python:3.7 steps: - checkout - run: ./build_tools/circle/checkout_merge_commit.sh @@ -130,7 +130,7 @@ jobs: deploy: docker: - - image: circleci/python:3.6 + - image: circleci/python:3.7 steps: - checkout - run: ./build_tools/circle/checkout_merge_commit.sh diff --git a/.travis.yml b/.travis.yml index 1e6ed78d28ac2..09f05b57eecfa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,19 +40,11 @@ jobs: - CPU_COUNT=4 # Linux environments to build the scikit-learn wheels for the ARM64 - # architecture and Python 3.6 and newer. This is used both at release time + # architecture and Python 3.7 and newer. This is used both at release time # with the manual trigger in the commit message in the release branch and as # a scheduled task to build the weekly dev build on the main branch. The # weekly frequency is meant to avoid depleting the Travis CI credits too # fast. - - python: 3.6 - os: linux - arch: arm64 - if: type = cron or commit_message =~ /\[cd build\]/ - env: - - BUILD_WHEEL=true - - CIBW_BUILD=cp36-manylinux_aarch64 - - python: 3.7 os: linux arch: arm64 From fb31d9102618804452a4c68c16551f9defd43f5d Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 18 May 2021 14:09:35 +0200 Subject: [PATCH 48/50] Move to debian buster for python3.7 dependencies. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fd7bbcf5651e..885b502cc92b9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: doc-min-dependencies: docker: - - image: circleci/python:3.7.3-stretch + - image: circleci/python:3.7.3-buster environment: - OMP_NUM_THREADS: 2 - MKL_NUM_THREADS: 2 @@ -47,7 +47,7 @@ jobs: doc: docker: - - image: circleci/python:3.7.3-stretch + - image: circleci/python:3.7.3-buster environment: - OMP_NUM_THREADS: 2 - MKL_NUM_THREADS: 2 From 64bb737aa15041d173942595d2590ba917d74232 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 18 May 2021 14:19:56 +0200 Subject: [PATCH 49/50] Fix the container tag. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 885b502cc92b9..f4ee4e4cf1dfb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 jobs: doc-min-dependencies: docker: - - image: circleci/python:3.7.3-buster + - image: circleci/python:3.7.7-buster environment: - OMP_NUM_THREADS: 2 - MKL_NUM_THREADS: 2 @@ -47,7 +47,7 @@ jobs: doc: docker: - - image: circleci/python:3.7.3-buster + - image: circleci/python:3.7.7-buster environment: - OMP_NUM_THREADS: 2 - MKL_NUM_THREADS: 2 From f17a7f11a61f12ba635f15372e65b6e158c5c381 Mon Sep 17 00:00:00 2001 From: Chiara Marmo Date: Tue, 18 May 2021 15:02:33 +0200 Subject: [PATCH 50/50] Lower the minimal pandas version for compatibility with python 3.7. --- sklearn/_min_dependencies.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sklearn/_min_dependencies.py b/sklearn/_min_dependencies.py index 128e66520d250..aa01b7fdfa352 100644 --- a/sklearn/_min_dependencies.py +++ b/sklearn/_min_dependencies.py @@ -26,8 +26,8 @@ 'threadpoolctl': (THREADPOOLCTL_MIN_VERSION, 'install'), 'cython': (CYTHON_MIN_VERSION, 'build'), 'matplotlib': ('2.2.2', 'benchmark, docs, examples, tests'), - 'scikit-image': ('0.13', 'docs, examples, tests'), - 'pandas': ('0.25.0', 'benchmark, docs, examples, tests'), + 'scikit-image': ('0.14', 'docs, examples, tests'), + 'pandas': ('0.23.4', 'benchmark, docs, examples, tests'), 'seaborn': ('0.9.0', 'docs, examples'), 'memory_profiler': ('0.57.0', 'benchmark, docs'), 'pytest': (PYTEST_MIN_VERSION, 'tests'),