From e5b3adfd25658aa5cc2a415222c48381b871f664 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:02:39 +0200 Subject: [PATCH 1/6] CI make build_doc.sh less verbose reduce log scrolling needs --- build_tools/github/build_doc.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build_tools/github/build_doc.sh b/build_tools/github/build_doc.sh index 673e6f3a70170..9aa168c3b8e9a 100755 --- a/build_tools/github/build_doc.sh +++ b/build_tools/github/build_doc.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -x +set -v set -e # Decide what kind of documentation build to run, and run it. @@ -154,17 +154,17 @@ sudo -E apt-get -yq update --allow-releaseinfo-change sudo -E apt-get -yq --no-install-suggests --no-install-recommends \ install dvipng gsfonts ccache zip optipng -# deactivate circleci virtualenv and setup a miniconda env instead +# deactivate circleci virtualenv and setup a conda env instead if [[ `type -t deactivate` ]]; then deactivate fi -MINICONDA_PATH=$HOME/miniconda -# Install dependencies with miniconda -wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-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" +MAMBAFORGE_PATH=$HOME/mambaforge +# Install dependencies with mamba +wget -q https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \ + -O mambaforge.sh +chmod +x mambaforge.sh && ./mambaforge.sh -b -p $MAMBAFORGE_PATH +export PATH="/usr/lib/ccache:$MAMBAFORGE_PATH/bin:$PATH" ccache -M 512M export CCACHE_COMPRESS=1 From 5d7c85212b70399078fce0dd219a7d8a928a8bd7 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:03:45 +0200 Subject: [PATCH 2/6] DEBUG insert doc change in example --- .../linear_model/plot_tweedie_regression_insurance_claims.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/linear_model/plot_tweedie_regression_insurance_claims.py b/examples/linear_model/plot_tweedie_regression_insurance_claims.py index 3d86903fcdeff..7a810bdcc365b 100644 --- a/examples/linear_model/plot_tweedie_regression_insurance_claims.py +++ b/examples/linear_model/plot_tweedie_regression_insurance_claims.py @@ -35,6 +35,8 @@ .. [1] A. Noll, R. Salzmann and M.V. Wuthrich, Case Study: French Motor Third-Party Liability Claims (November 8, 2018). `doi:10.2139/ssrn.3164764 `_ + +DEBUG: don't forge to revert me before merging. """ # Authors: Christian Lorentzen From 3cb5252174bd977ede76dc2c021cfa1a19079165 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:17:19 +0200 Subject: [PATCH 3/6] Remove set -v and silence the scikit-learn dev build --- build_tools/github/build_doc.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_tools/github/build_doc.sh b/build_tools/github/build_doc.sh index 9aa168c3b8e9a..96865db592eab 100755 --- a/build_tools/github/build_doc.sh +++ b/build_tools/github/build_doc.sh @@ -1,5 +1,4 @@ #!/usr/bin/env bash -set -v set -e # Decide what kind of documentation build to run, and run it. @@ -179,7 +178,7 @@ mamba list # Set parallelism to 3 to overlap IO bound tasks with CPU bound tasks on CI # workers with 2 cores when building the compiled extensions of scikit-learn. export SKLEARN_BUILD_PARALLEL=3 -python setup.py develop +pip install -e . --no-build-isolation export OMP_NUM_THREADS=1 From 493793d90d4f4a216bb06cc1214b8bae008efeb6 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:22:24 +0200 Subject: [PATCH 4/6] Set conda-lock log level to WARNING instead of INFO --- build_tools/github/build_doc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github/build_doc.sh b/build_tools/github/build_doc.sh index 96865db592eab..1b4c492058b5b 100755 --- a/build_tools/github/build_doc.sh +++ b/build_tools/github/build_doc.sh @@ -170,7 +170,7 @@ export CCACHE_COMPRESS=1 # pin conda-lock to latest released version (needs manual update from time to time) mamba install conda-lock==1.0.5 -y -conda-lock install --name $CONDA_ENV_NAME $LOCK_FILE +conda-lock install --log-level WARNING --name $CONDA_ENV_NAME $LOCK_FILE source activate $CONDA_ENV_NAME mamba list From 8cba9c30951a06ba26cf775b9bf1b65661899e3b Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:41:55 +0200 Subject: [PATCH 5/6] Display ccache summary after build --- build_tools/github/build_doc.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_tools/github/build_doc.sh b/build_tools/github/build_doc.sh index 1b4c492058b5b..249dd82e798b6 100755 --- a/build_tools/github/build_doc.sh +++ b/build_tools/github/build_doc.sh @@ -180,6 +180,9 @@ mamba list export SKLEARN_BUILD_PARALLEL=3 pip install -e . --no-build-isolation +echo "ccache build summary:" +ccache -s + export OMP_NUM_THREADS=1 if [[ "$CIRCLE_BRANCH" =~ ^main$ && -z "$CI_PULL_REQUEST" ]] From 3c313d4f2b9329cc37f7cac007f350cbfdf98758 Mon Sep 17 00:00:00 2001 From: Olivier Grisel Date: Tue, 7 Jun 2022 11:42:16 +0200 Subject: [PATCH 6/6] Revert debug doc change --- .../linear_model/plot_tweedie_regression_insurance_claims.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/linear_model/plot_tweedie_regression_insurance_claims.py b/examples/linear_model/plot_tweedie_regression_insurance_claims.py index 7a810bdcc365b..3d86903fcdeff 100644 --- a/examples/linear_model/plot_tweedie_regression_insurance_claims.py +++ b/examples/linear_model/plot_tweedie_regression_insurance_claims.py @@ -35,8 +35,6 @@ .. [1] A. Noll, R. Salzmann and M.V. Wuthrich, Case Study: French Motor Third-Party Liability Claims (November 8, 2018). `doi:10.2139/ssrn.3164764 `_ - -DEBUG: don't forge to revert me before merging. """ # Authors: Christian Lorentzen