Skip to content

Release 1.0.1 #21404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 127 commits into from
Oct 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
44829d8
CLN Removes old sphinx theme (#20962)
thomasjpfan Sep 8, 2021
76c552f
TST enable tests K-means for MacOS (#21052)
glemaitre Sep 15, 2021
99d9980
MAINT remove duplicate category (#21056)
PSSF23 Sep 15, 2021
71ba1a7
TST add unit tests for current _get_response (#21041)
glemaitre Sep 18, 2021
acff485
DOC Ensures that NeighborhoodComponentsAnalysis passes numpydoc valid…
jmloyola Sep 20, 2021
8cd7d6a
DOC Ensures that NearestCentroid passes numpydoc validation (#21084)
jmloyola Sep 20, 2021
2b678b6
DOC Ensure TheilSenRegressor passes numpydoc validation (#21087)
EricEllwanger Sep 20, 2021
1e44ec9
DOC fix typo in DET curve description (#21089)
almeidayoel Sep 20, 2021
5bd10d2
MNT Remove obsolete code (Python >= 3.7) (#21092)
DimitriPapadopoulos Sep 20, 2021
3cded27
DOC Fix sphinx's links to Glossary (#21094)
jmloyola Sep 21, 2021
bcd84c1
DOC - Ensure that SGDOneClassSVM pass numpydoc validation (#21105)
EricEllwanger Sep 23, 2021
5167b53
DOC - Ensure that TweedieRegressor pass numpydoc validation (#21104)
EricEllwanger Sep 23, 2021
ed6ec06
MAINT Removes remaining references to python 3.6 (#21110)
thomasjpfan Sep 23, 2021
2b511c6
fix typos in docstring for calibration (#21103)
discdiver Sep 23, 2021
07b6f99
DOC correct input array type in MeanShift.predict (#20796)
milana2 Sep 23, 2021
e22c169
DOC Ensure SGDRegressor passes numpydoc validation (#21097)
EricEllwanger Sep 23, 2021
3e34c3c
DOC Fix minor issues in bike sharing example (#21127)
lesteve Sep 23, 2021
f59b354
DOC ensure SpectralClustering passes numpydoc validation and improve …
lobpcg Sep 23, 2021
8b0a136
FIX improve error message for large sparse matrix input in LogisticRe…
TomDLT Sep 24, 2021
2c136cc
DOC Build proper sentence for Davies-Bouldin Index advantage (#21081)
jhlegarreta Sep 24, 2021
9580e21
TST Adjust learning rate to compare with LightGBM 3.X (#21082)
thomasjpfan Sep 24, 2021
db5ca52
DOC remove redundant code in GPR example (#21133)
zhaofeng-shu33 Sep 24, 2021
ccc1927
DOC Ensures that RandomizedSearchCV passes numpydoc validation (#21131)
nikJ13 Sep 24, 2021
02e5855
DOC correct the type of estimator attributes (#21141)
glemaitre Sep 24, 2021
fb8eb89
FIX Fixes test for checking gitignore and Cython templates (#20997)
gaborkertesz Sep 24, 2021
7775331
DOC Ensures that MissingIndicator passes numpydoc validation (#21149)
jmloyola Sep 27, 2021
8d2fc7b
DOC Ensures that RobustScaler passes numpydoc validation (#21155)
jmloyola Sep 27, 2021
9ce8b5f
DOC fix an import in the docsting of RationalQuadratic (#21156)
zhaofeng-shu33 Sep 27, 2021
9f50ed7
DOC Ensure StackingClassifier pass numpydoc validation (#21135)
EricEllwanger Sep 27, 2021
e8d6d7d
DOC move versionadded misplaced (#21162)
glemaitre Sep 27, 2021
7c7aa07
MAINT update externals/_lobpcg.py with upstream (#21163)
DimitriPapadopoulos Sep 27, 2021
ee4a2a8
MNT sync externals/_pilutil.py with upstream (#21161)
DimitriPapadopoulos Sep 27, 2021
49570bf
DOC Fix interpretation in plot_agglomerative_clustering.py (#21167)
hongshaoyang Sep 28, 2021
f5dd73f
DOC Ensures that IterativeImputer passes numpydoc validation (#21108)
jmloyola Sep 28, 2021
ef3f617
DOC Ensures that PLSCanonical passes numpydoc validation (#21175)
Pinky-Chaudhary Sep 28, 2021
e196579
FIX sphinx formatting in load_boston (#21185)
ogrisel Sep 29, 2021
371bf59
DOC fix typo in the README file (#21187)
ABHIGPT401 Sep 29, 2021
6670581
DOC Adds missing imports into examples and test them (#21186)
thomasjpfan Sep 29, 2021
cbc2a9b
DOC minor updates to release process (#21172)
adrinjalali Sep 29, 2021
892fb49
DOC Ensures that MiniBatchKMeans passes numpydoc validation (#21202)
Pinky-Chaudhary Sep 30, 2021
e282c0d
DOC Ensures that PLSSVD passes numpydoc validation (#21198)
jmloyola Sep 30, 2021
d2121e9
DOC fix typo in load_boston docstring (#21197)
rdboyes Sep 30, 2021
444e65a
DOC Ensures that LocalOutlierFactor passes numpydoc validation (#21180)
Pinky-Chaudhary Sep 30, 2021
04ff48e
DOC Ensures that PLSRegression passes numpydoc validation (#21208)
jmloyola Oct 1, 2021
9e15880
TST check equivalence sample_weight in CalibratedClassifierCV (#21179)
glemaitre Oct 1, 2021
bad6964
FIX Non-fit methods no long raises UserWarning for valid dataframes (…
thomasjpfan Oct 1, 2021
1aac9ae
DOC Fix changelog formatting (#21220)
thomasjpfan Oct 1, 2021
b9fc2c7
MAINT Codespell configuration (#21051)
DimitriPapadopoulos Oct 4, 2021
bcbf161
DOC Ensures that PatchExtractor passes numpydoc validation (#21233)
jmloyola Oct 4, 2021
8c30632
DOC Ensures that PolynomialFeatures passes numpydoc validation (#21239)
jmloyola Oct 5, 2021
cd14271
FIX Do not use deprecated API in fetch_20newsgroups_vectorized (#21216)
thomasjpfan Oct 5, 2021
3e634bc
FIX Improve best run detection in kmeans when n_init > 1 (#21195)
jeremiedbb Oct 5, 2021
6e07fcd
DOC Add Twitter in Community Section (#21241)
swapniljha001 Oct 5, 2021
79a808a
Use merge=union strategy for all version changelogs (#21235)
lesteve Oct 5, 2021
7eb22fc
MNT move PR template to .github directory (#21229)
Borda Oct 5, 2021
e485ab4
MAINT Fix chmod ±x in .sh and .pyx files (#21234)
DimitriPapadopoulos Oct 5, 2021
009579e
FIX out of bound error in split_indices (#21130)
lorentzenchr Oct 6, 2021
a515cae
DOC Remove unused import from example (#21253)
he7d3r Oct 6, 2021
a34f441
MAINT Enable and run black on examples (#20502)
thomasjpfan Oct 7, 2021
da864f6
DOC Ensures that SplineTransformer passes numpydoc validation (#21248)
Pinky-Chaudhary Oct 7, 2021
4240211
BLD Fixes osx build by downgrading to 11.X (#21227)
thomasjpfan Oct 7, 2021
b33eaa5
DOC Cross-link check_estimator and parametrize_with_checks (#21269)
rth Oct 7, 2021
4b1518d
DOC Clarify use_idf in TfidfTransformer/TfidfVectorizer docstrings (#…
hongshaoyang Oct 7, 2021
47c05f0
DOC Ensures that SelfTrainingClassifier passes numpydoc validation (#…
jmloyola Oct 8, 2021
67439ab
DOC Remove some str/unicode leftovers from Python 2 (#21270)
DimitriPapadopoulos Oct 8, 2021
226b664
MNT use new threadpoolctl API (global threadpool controller) (#21206)
jeremiedbb Oct 8, 2021
a894f31
FIX: tol in _spectral_embedding.py (#21194)
lobpcg Oct 8, 2021
57fa875
CI Adapt Circle CI script for ARM (#21174)
jjerphan Oct 9, 2021
d962049
DOC Linear regression n_jobs doc update (#21258)
simonandras Oct 12, 2021
c027d77
DOC updated variable name in KRR docstring (#21281)
Ishan-Kumar2 Oct 12, 2021
c77fc4e
DOC Specify Units for Mutual Information Metrics (#18641)
amrcode Oct 12, 2021
f369eed
FIX raise error for max_df and min_df greater than 1 in Vectorizer (#…
AlekLefebvre Oct 12, 2021
650bbe0
DOC Ensures that PassiveAggressiveClassifier passes numpydoc validati…
ovynnej Oct 12, 2021
e68c6bd
DOC Display diagram to pipeline example (#18758)
reshamas Oct 13, 2021
45c651b
MAINT Fix Check Manifest in CI (#21317)
DimitriPapadopoulos Oct 13, 2021
21bd17a
DOC Remove _"mse"_ from `RandomForestRegression` docstring (#21306)
luxedo Oct 13, 2021
5f8500f
DOC rename multilabel to multiclass in Plot ROC subtitle (#21322)
captnTardigrade Oct 14, 2021
1ae4435
DOC Remove deprecated loss function names from docstrings (#21314)
luxedo Oct 14, 2021
cd14b8f
MAINT Adds running Black on examples to .git-blame-ignore-revs (#21275)
thomasjpfan Oct 14, 2021
24426a3
DOC Fixes logo and badge on PyPi's readme (#21222)
thomasjpfan Oct 14, 2021
998465a
MNT Remove #!/usr/bin/python shebang in examples (#21246)
DimitriPapadopoulos Oct 14, 2021
4b3c217
FIX set docstrings on sklearn.utils.fixes.threadpool_limits/info (#21…
ogrisel Oct 15, 2021
ee6b7d3
CI Switches Pillow to use main (#21342)
thomasjpfan Oct 16, 2021
2b3d574
DOC improve build instructions to be friendlier to first time contrib…
ogrisel Oct 16, 2021
7fb6882
CI Fixes test_rank_deficient_design (#21345)
thomasjpfan Oct 18, 2021
f9ebc43
MNT Use conda-forge instead of the main channel in CI (#21337)
adrinjalali Oct 18, 2021
8dc7a1c
DOC Ensures that TransformedTargetRegressor passes numpydoc validatio…
jmloyola Oct 18, 2021
ef4343a
DOC use conda-forge to create the environment in the installation doc…
adrinjalali Oct 18, 2021
66b50a1
DOC Ensures that QuadraticDiscriminantAnalysis passes numpydoc valida…
g4brielvs Oct 18, 2021
6dc1013
FIX Allows pipeline to pass through feature names (#21351)
thomasjpfan Oct 19, 2021
d6ecaa7
DOC update documentation for DBSCAN and OPTICS (#21343)
christopherlim98 Oct 19, 2021
9f0df90
DOC renew dead link to paper (#21372)
millawell Oct 19, 2021
56a4b95
MAINT Shorten parametrized test names with long error messages (#21364)
ogrisel Oct 19, 2021
fc3cfbd
DOC Doc fix for one_hot_encoder (#21074)
thomasjpfan Oct 20, 2021
296463c
FIX Prevents segfault in SVC when internals are altered (#21336)
thomasjpfan Oct 20, 2021
1d17f94
FIX avoid scalar/array boolean operation in _IffHasAttrDescriptor (#2…
Zahlii Oct 20, 2021
a734af1
DOC ensures MultiTaskLasso passes numpydoc validation (#21363)
felixglush Oct 20, 2021
099d455
FIX CountVectorizer: check upper case in vocab only in fit (#21251)
jeremiedbb Oct 20, 2021
4143ad5
DOC Ensures that OrthogonalMatchingPursuit passes numpydoc validation…
mani2106 Oct 20, 2021
010b9df
DOC fix hyperlinkg to MultiLabelBinarizer (#21331)
jmloyola Oct 20, 2021
602f3c3
DOC Ensures that MultiLabelBinarizer passes numpydoc validation (#21315)
jmloyola Oct 20, 2021
e7221e3
DOC Ensures that SparseRandomProjection passes numpydoc validation (#…
baam25simo Oct 20, 2021
5f02008
DOC Use :doi: and :arxiv: directives for references (#21099)
puhuk Oct 20, 2021
dbe615f
FIX compute y_std and y_cov properly with multi-target in GPR (#20761)
patrickctrf Oct 20, 2021
ed609d3
DOC typo in the dosctring of AdaBoostClassifier (#21379)
glemaitre Oct 21, 2021
0b7a6b8
DOC Ensures that MultiTaskElasticNet passes numpydoc validation (#21381)
spikebh Oct 21, 2021
b7a0b74
DOC Ensures that MultiTaskLassoCV passes numpydoc validation (#21256)
Pinky-Chaudhary Oct 21, 2021
e0f7602
DOC Ensures that LabelPropagation passes numpydoc validation (#20991)
genvalen Oct 21, 2021
65863f6
DOC Ensures that KNNImputer passes numpydoc validation (#21272)
baam25simo Oct 21, 2021
9508a37
DOC Ensures that LocallyLinearEmbedding passes numpydoc validation (#…
baam25simo Oct 21, 2021
acb27c4
DOC highlight source of biases feature importances (#21384)
glemaitre Oct 21, 2021
549081a
MAINT pin python version for source tarball builder [cd build] (#21386)
ogrisel Oct 21, 2021
79db679
DOC improve wording of the F1 score as a harmonic mean (#21390)
scalyvladimir Oct 21, 2021
e0aa90a
DOC Ensures that SpectralBiclustering passes numpydoc validation (#21…
g4brielvs Oct 22, 2021
015921f
Trim trailing whitespace
ogrisel Oct 22, 2021
144470c
XFAIL test_linear_model_normalize_deprecation_message on macos (#21396)
ogrisel Oct 22, 2021
fef06b7
MAINT consistent use of `print(__doc__)` in examples (#21307)
DimitriPapadopoulos Oct 22, 2021
ba25dec
MNT fix changelog 1.0.1 (#21416)
glemaitre Oct 23, 2021
3b43e47
MNT remove 1.1 changelog due to rebase conflict
glemaitre Oct 23, 2021
4dcf362
bumpversion to 1.0.1
glemaitre Oct 23, 2021
937eb4e
FIX delete feature_names_in_ when refitting on a ndarray (#21389)
jeremiedbb Oct 23, 2021
025be1b
Trigger wheel builder workflow: [cd build]
glemaitre Oct 23, 2021
4b9b932
DOC Ensures that OrthogonalMatchingPursuitCV passes numpydoc validati…
spikebh Oct 23, 2021
decadb6
DOC Ensures that PassiveAggressiveRegressor passes numpydoc validatio…
g4brielvs Oct 23, 2021
cc1be80
DOC Ensures that LabelSpreading passes numpydoc validation (#21414)
g4brielvs Oct 23, 2021
dbd0e79
DOC Ensures that MultiTaskElasticNetCV passes numpydoc validation (#2…
spikebh Oct 23, 2021
092343f
DOC update the News section in website (#21417)
glemaitre Oct 25, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 9 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,12 @@ jobs:
image: ubuntu-2004:202101-01
resource_class: arm.medium
environment:
# Use the latest supported version of python
- PYTHON_VERSION: '3.9'
- OMP_NUM_THREADS: 2
- OPENBLAS_NUM_THREADS: 2
- NUMPY_VERSION: 'latest'
- SCIPY_VERSION: 'latest'
- CYTHON_VERSION: 'latest'
- JOBLIB_VERSION: 'latest'
- THREADPOOLCTL_VERSION: 'latest'
Expand All @@ -126,18 +130,16 @@ jobs:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
- restore_cache:
key: v1-datasets-{{ .Branch }}
key: linux-arm64-{{ .Branch }}
- run: ./build_tools/circle/build_test_arm.sh
- save_cache:
key: doc-ccache-{{ .Branch }}-{{ .BuildNum }}
key: linux-arm64-{{ .Branch }}
paths:
- ~/.ccache
- ~/.cache/ccache
- ~/.cache/pip
- save_cache:
key: v1-datasets-{{ .Branch }}
paths:
- ~/scikit_learn_data

# The source build folder.
- ~/project/build
deploy:
docker:
- image: circleci/python:3.7
Expand Down
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@

# PR 20412: Use experimental_string_processing=true in Black
3ae7c7615343bbd36acece57825d8b0d70fd9da4

# PR 20502: Runs Black on examples
70a185ae59b4362633d18b0d0083abb1b6f7370c
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/doc/whats_new.rst merge=union
/doc/whats_new/v*.rst merge=union
File renamed without changes.
2 changes: 2 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ jobs:

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.9' # update once build dependencies are available

- name: Build source distribution
run: bash build_tools/github/build_source.sh
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ recursive-exclude benchmarks *
recursive-exclude .binder *
recursive-exclude .circleci *
exclude .codecov.yml
exclude .git-blame-ignore-revs
exclude .mailmap
exclude .pre-commit-config.yaml
exclude azure-pipelines.yml
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
.. |PythonVersion| image:: https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue
.. _PythonVersion: https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9-blue

.. |PyPi| image:: https://badge.fury.io/py/scikit-learn.svg
.. _PyPi: https://badge.fury.io/py/scikit-learn
.. |PyPi| image:: https://img.shields.io/pypi/v/scikit-learn
.. _PyPi: https://pypi.org/project/scikit-learn

.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
.. _Black: https://github.com/psf/black
Expand All @@ -35,13 +35,13 @@
.. |SciPyMinVersion| replace:: 1.1.0
.. |JoblibMinVersion| replace:: 0.11
.. |ThreadpoolctlMinVersion| replace:: 2.0.0
.. |MatplotlibMinVersion| replace:: 2.2.2
.. |MatplotlibMinVersion| replace:: 2.2.3
.. |Scikit-ImageMinVersion| replace:: 0.14.5
.. |PandasMinVersion| replace:: 0.25.0
.. |SeabornMinVersion| replace:: 0.9.0
.. |PytestMinVersion| replace:: 5.0.1

.. image:: doc/logos/scikit-learn-logo.png
.. image:: https://raw.githubusercontent.com/scikit-learn/scikit-learn/main/doc/logos/scikit-learn-logo.png
:target: https://scikit-learn.org/

**scikit-learn** is a Python module for machine learning built on top of
Expand Down
21 changes: 13 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,9 @@ jobs:
)
)
matrix:
pylatest_conda_mkl:
pylatest_conda_forge_mkl:
DISTRIB: 'conda'
CONDA_CHANNEL: 'conda-forge'
PYTHON_VERSION: '*'
BLAS: 'mkl'
COVERAGE: 'false'
Expand All @@ -116,8 +117,9 @@ jobs:
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
pylatest_conda_mkl:
pylatest_conda_forge_mkl:
DISTRIB: 'conda'
CONDA_CHANNEL: 'conda-forge'
PYTHON_VERSION: '*'
BLAS: 'mkl'
COVERAGE: 'true'
Expand All @@ -135,8 +137,9 @@ jobs:
ne(variables['Build.Reason'], 'Schedule')
)
matrix:
py37_conda:
py37_conda_forge_openblas_ubuntu_1804:
DISTRIB: 'conda'
CONDA_CHANNEL: 'conda-forge'
PYTHON_VERSION: '3.7'
BLAS: 'openblas'
COVERAGE: 'false'
Expand Down Expand Up @@ -164,14 +167,15 @@ jobs:
THREADPOOLCTL_VERSION: 'min'
COVERAGE: 'false'
# Linux + Python 3.7 build with OpenBLAS and without SITE_JOBLIB
py37_conda_openblas:
py37_conda_defaults_openblas:
DISTRIB: 'conda'
CONDA_CHANNEL: 'defaults' # Anaconda main channel
PYTHON_VERSION: '3.7'
BLAS: 'openblas'
NUMPY_VERSION: 'min'
SCIPY_VERSION: 'min'
MATPLOTLIB_VERSION: 'min'
THREADPOOLCTL_VERSION: '2.0.0'
THREADPOOLCTL_VERSION: '2.2.0'
# Linux environment to test the latest available dependencies and MKL.
# It runs tests requiring lightgbm, pandas and PyAMG.
pylatest_pip_openblas_pandas:
Expand Down Expand Up @@ -206,7 +210,7 @@ jobs:
# disable pytest xdist due to unknown bug with 32-bit container
PYTEST_XDIST_VERSION: 'none'
PYTEST_VERSION: 'min'
THREADPOOLCTL_VERSION: 'min'
THREADPOOLCTL_VERSION: '2.2.0'

- template: build_tools/azure/posix.yml
parameters:
Expand Down Expand Up @@ -242,13 +246,14 @@ jobs:
ne(variables['Build.Reason'], 'Schedule')
)
matrix:
py37_conda_mkl:
py37_conda_forge_mkl:
DISTRIB: 'conda'
CONDA_CHANNEL: 'conda-forge'
PYTHON_VERSION: '3.7'
CHECK_WARNINGS: 'true'
PYTHON_ARCH: '64'
PYTEST_VERSION: '*'
COVERAGE: 'true'
DISTRIB: 'conda'
py37_pip_openblas_32bit:
PYTHON_VERSION: '3.7'
PYTHON_ARCH: '32'
4 changes: 3 additions & 1 deletion benchmarks/bench_hist_gradient_boosting.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ def one_run(n_samples):
lightgbm_score_duration = None
if args.lightgbm:
print("Fitting a LightGBM model...")
lightgbm_est = get_equivalent_estimator(est, lib="lightgbm")
lightgbm_est = get_equivalent_estimator(
est, lib="lightgbm", n_classes=args.n_classes
)

tic = time()
lightgbm_est.fit(X_train, y_train, sample_weight=sample_weight_train)
Expand Down
8 changes: 6 additions & 2 deletions benchmarks/bench_hist_gradient_boosting_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ def get_estimator_and_data():
for libname in ["lightgbm", "xgboost", "catboost"]:
if getattr(args, libname):
print(libname)
est = get_equivalent_estimator(sklearn_est, lib=libname)
est = get_equivalent_estimator(
sklearn_est, lib=libname, n_classes=args.n_classes
)
pprint(est.get_params())


Expand Down Expand Up @@ -169,7 +171,9 @@ def one_run(n_threads, n_samples):
lightgbm_score_duration = None
if args.lightgbm:
print("Fitting a LightGBM model...")
lightgbm_est = get_equivalent_estimator(est, lib="lightgbm")
lightgbm_est = get_equivalent_estimator(
est, lib="lightgbm", n_classes=args.n_classes
)
lightgbm_est.set_params(num_threads=n_threads)

tic = time()
Expand Down
10 changes: 5 additions & 5 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ make_conda() {
if [[ "$DISTRIB" == *"mamba"* ]]; then
mamba create -n $VIRTUALENV --yes $TO_INSTALL
else
conda config --show
conda create -n $VIRTUALENV --yes $TO_INSTALL
fi
source activate $VIRTUALENV
Expand All @@ -38,7 +39,7 @@ source build_tools/shared.sh
if [[ "$DISTRIB" == "conda" || "$DISTRIB" == *"mamba"* ]]; then

if [[ "$CONDA_CHANNEL" != "" ]]; then
TO_INSTALL="-c $CONDA_CHANNEL"
TO_INSTALL="--override-channels -c $CONDA_CHANNEL"
else
TO_INSTALL=""
fi
Expand Down Expand Up @@ -113,9 +114,8 @@ elif [[ "$DISTRIB" == "conda-pip-latest" ]]; then
python -m pip install --only-binary :all: scikit-image || true

python -m pip install pandas matplotlib pyamg
# do not install dependencies for lightgbm since it requires scikit-learn
# and install a version less than 3.0.0 until the issue #18316 is solved.
python -m pip install "lightgbm<3.0.0" --no-deps
# do not install dependencies for lightgbm since it requires scikit-learn.
python -m pip install "lightgbm>=3.0.0" --no-deps
elif [[ "$DISTRIB" == "conda-pip-scipy-dev" ]]; then
# FIXME: temporary fix to link against system libraries on linux
export LDFLAGS="$LDFLAGS -Wl,--sysroot=/"
Expand All @@ -129,7 +129,7 @@ elif [[ "$DISTRIB" == "conda-pip-scipy-dev" ]]; then
echo "Installing joblib master"
pip install https://github.com/joblib/joblib/archive/master.zip
echo "Installing pillow master"
pip install https://github.com/python-pillow/Pillow/archive/master.zip
pip install https://github.com/python-pillow/Pillow/archive/main.zip
fi

python -m pip install $(get_dep threadpoolctl $THREADPOOLCTL_VERSION) \
Expand Down
30 changes: 14 additions & 16 deletions build_tools/azure/test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ if [[ "$BUILD_WITH_ICC" == "true" ]]; then
source /opt/intel/oneapi/setvars.sh
fi

python --version
python -c "import numpy; print('numpy %s' % numpy.__version__)"
python -c "import scipy; print('scipy %s' % scipy.__version__)"
python -c "\
try:
import pandas
print('pandas %s' % pandas.__version__)
except ImportError:
print('pandas not installed')
"
python -c "import multiprocessing as mp; print('%d CPUs' % mp.cpu_count())"
pip list
mkdir -p $TEST_DIR
cp setup.cfg $TEST_DIR
cd $TEST_DIR

python -c "import sklearn; sklearn.show_versions()"
python -m threadpoolctl -i sklearn

if ! command -v conda &> /dev/null
then
pip list
else
# conda list provides more info than pip list (when available)
conda list
fi

TEST_CMD="python -m pytest --showlocals --durations=20 --junitxml=$JUNITXML"

Expand All @@ -46,10 +48,6 @@ if [[ "$PYTEST_XDIST_VERSION" != "none" ]]; then
TEST_CMD="$TEST_CMD -n2"
fi

mkdir -p $TEST_DIR
cp setup.cfg $TEST_DIR
cd $TEST_DIR

set -x
$TEST_CMD --pyargs sklearn
set +x
78 changes: 53 additions & 25 deletions build_tools/circle/build_test_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e
set -x

UNAMESTR=`uname`
N_CORES=`nproc --all`


setup_ccache() {
echo "Setting up ccache"
Expand All @@ -12,49 +14,75 @@ setup_ccache() {
for name in gcc g++ cc c++ x86_64-linux-gnu-gcc x86_64-linux-gnu-c++; do
ln -s $(which ccache) "/tmp/ccache/${name}"
done
export PATH="/tmp/ccache/:${PATH}"
ccache -M 256M
export PATH="/tmp/ccache:${PATH}"
# Unset ccache limits
ccache -F 0
ccache -M 0
}

# imports get_dep
source build_tools/shared.sh

sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install python3-virtualenv ccache
python3 -m virtualenv --system-site-packages --python=python3 testenv
source testenv/bin/activate
pip install --upgrade pip

# Setup conda environment
MINICONDA_URL="https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh"

# Install Mambaforge
wget $MINICONDA_URL -O mambaforge.sh
MINICONDA_PATH=$HOME/miniconda
chmod +x mambaforge.sh && ./mambaforge.sh -b -p $MINICONDA_PATH
export PATH=$MINICONDA_PATH/bin:$PATH
mamba init --all --verbose
mamba update --yes conda

# Create environment and install dependencies
mamba create -n testenv --yes $(get_dep python $PYTHON_VERSION)
source activate testenv

# Use the latest by default
mamba install --verbose -y ccache \
pip \
$(get_dep numpy $NUMPY_VERSION) \
$(get_dep scipy $SCIPY_VERSION) \
$(get_dep cython $CYTHON_VERSION) \
$(get_dep joblib $JOBLIB_VERSION) \
$(get_dep threadpoolctl $THREADPOOLCTL_VERSION) \
$(get_dep pytest $PYTEST_VERSION) \
$(get_dep pytest-xdist $PYTEST_XDIST_VERSION)
setup_ccache
python -m pip install $(get_dep cython $CYTHON_VERSION) \
$(get_dep joblib $JOBLIB_VERSION)
python -m pip install $(get_dep threadpoolctl $THREADPOOLCTL_VERSION) \
$(get_dep pytest $PYTEST_VERSION) \
$(get_dep pytest-xdist $PYTEST_XDIST_VERSION)

if [[ "$COVERAGE" == "true" ]]; then
python -m pip install codecov pytest-cov
fi

if [[ "$PYTEST_XDIST_VERSION" != "none" ]]; then
python -m pip install pytest-xdist
mamba install --verbose -y codecov pytest-cov
fi

if [[ "$TEST_DOCSTRINGS" == "true" ]]; then
# numpydoc requires sphinx
python -m pip install sphinx
python -m pip install numpydoc
mamba install --verbose -y sphinx
mamba install --verbose -y numpydoc
fi

python --version

# 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
# Set parallelism to $N_CORES + 1 to overlap IO bound tasks with CPU bound tasks on CI
# workers with $N_CORES cores when building the compiled extensions of scikit-learn.
export SKLEARN_BUILD_PARALLEL=$(($N_CORES + 1))

# Disable the build isolation and build in the tree so that the same folder can be
# cached between CI runs.
# TODO: remove the '--use-feature' flag when made obsolete in pip 21.3.
pip install --verbose --no-build-isolation --use-feature=in-tree-build .

# Report cache usage
ccache -s --verbose

mamba list

python -m pip list
pip install --verbose --editable .
ccache -s
# Changing directory not to have module resolution use scikit-learn source
# directory but to the installed package.
cd /tmp
python -c "import sklearn; sklearn.show_versions()"
python -m threadpoolctl --import sklearn
python -m pytest sklearn
# Test using as many workers as available cores
pytest --pyargs -n $N_CORES sklearn
Loading