Skip to content
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

Release 1.2.1 #25442

Merged
merged 93 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
9323dd2
DOC Update docs for making a release (#25047)
jeremiedbb Nov 28, 2022
f5f4663
TST use global_dtype in sklearn/manifold/tests/test_isomap.py (#22673)
jjerphan Nov 29, 2022
5741677
DOC Improve docs of BaseLabelPropagation.transduction_ (#24985)
scottgigante-immunai Dec 1, 2022
fbba000
DOC fix typo in cross_validate docstring (#25090)
lesteve Dec 1, 2022
4194065
MAINT adjust tolerance in test_balance_property (#25098)
ogrisel Dec 2, 2022
53f8fbd
update release checklist regarding SECURITY.md (#25122)
jeremiedbb Dec 6, 2022
0cf8a8c
CI Fixes Azure atlas CI job (#25136)
thomasjpfan Dec 8, 2022
8e28c6a
MAINT update SECURITY.md (#25138)
jeremiedbb Dec 8, 2022
bf9eb84
DOC Add missing step to the "making a release" checklist (#25139)
jeremiedbb Dec 8, 2022
944c2e2
FIX Convert boolean pd.Series to boolean ndarrays (#25147)
betatim Dec 12, 2022
b4c6ca4
CI Introduces macOS arm64 wheel building with Cirrus CI [cd build cir…
thomasjpfan Dec 12, 2022
582e5c8
MAINT exclude cirrus.star from MANIFEST (#25185)
glemaitre Dec 13, 2022
bcda708
MAINT handle deprecations from `importlib.resources` (#25157)
jjerphan Dec 13, 2022
f9492bb
CI Adds quicker CI failure to reduce resource usage (#21497)
thomasjpfan Dec 13, 2022
ac70158
DOC improve inline comments in SAGA (#25100)
TomDLT Dec 13, 2022
6cca595
MAINT sync lobpcg with SciPy main (#25176)
glemaitre Dec 14, 2022
2d3047b
Use `check_array` to validate `y` (#25089)
betatim Dec 15, 2022
3694d22
MAINT fix deprecation raised in scipy-dev build (#25175)
glemaitre Dec 15, 2022
266d2b0
FIX fix pickling for empty object with Python 3.11+ (#25188)
BenjaminBossan Dec 16, 2022
32dd56a
DOC fix rendering of versionadded (#25211)
vitaliset Dec 19, 2022
d95a601
DOC add link to Korean documentation translation (#25205)
panda5176 Dec 22, 2022
e4c23b5
DOC consistency fixes in multiclass estimators docstring (#25226)
glemaitre Dec 22, 2022
717c775
FIX Ensure dtype of categories is `object` for strings in `OneHotEnco…
betatim Dec 22, 2022
ad53590
TST check error consistency when calling get_feature_names_out on unf…
jpangas Dec 28, 2022
5f01a31
FIX `cross_validate` with multimetric scoring returns the non-failed …
simonandras Dec 28, 2022
d60d9fd
TST Add common tests for single class fitting induced by sample weigh…
cmarmo Dec 29, 2022
13ec132
DOC fix typo in logistic regression (#25263)
david-cortes Dec 31, 2022
684e781
FIX regression due to memoryview in SGD when using verbose (#25250)
jeremiedbb Jan 2, 2023
f58c08a
DOC include kernel_approx ref in svm (#25266)
rprkh Jan 3, 2023
ae5a22f
FIX Handles all numerical DataFrames with check_inverse=True in Funct…
thomasjpfan Jan 3, 2023
61b55f0
TST use global_random_seed in sklearn/covariance/tests/test_elliptic_…
irene000 Jan 3, 2023
67e371d
FIX Raises informative error in FeatureHasher when a sample is a sing…
thomasjpfan Jan 3, 2023
3787595
MNT Enable O3 optimization for trees (#25277)
thomasjpfan Jan 3, 2023
0ce78e0
FIX Allow input validation by pass in MLPClassifier (#24873)
betatim Jan 4, 2023
f5b6368
DOC Minor refinements of lars_path docstring (#25235)
ionicsolutions Jan 4, 2023
8618ac2
MAINT update sklearn-ci email to ci@scikit-learn.org (#25302)
ogrisel Jan 5, 2023
be169bf
Document config_context and transform output (#25289)
ravwojdyla Jan 5, 2023
d5c5416
TST Remove ConvergenceWarnings in test_logistic (#25062)
thomasjpfan Jan 5, 2023
c4f46c1
DOC fix typo in euclidean_distances (#25331)
99991 Jan 9, 2023
4e7e724
DOC document how to generate a valid CIRCLE_CI_TOKEN (#25338)
ogrisel Jan 9, 2023
5f11c83
DOC fix typo in doc/developers/contributing.rst (#25343) (#25344)
crispinlogan Jan 10, 2023
bbe98e5
FIX Fixes transform wrappig in _SetOutputMixin (#25295)
thomasjpfan Jan 10, 2023
d490267
TST Fixes set random seed for test_multinomial_binary_probabilities (…
thomasjpfan Jan 11, 2023
64d9532
CI Only run cirrus on the scikit-learn repo (#25349)
thomasjpfan Jan 11, 2023
649f660
MNT Fixes convergence issue in test_logistic.py (#25345)
thomasjpfan Jan 11, 2023
53007b1
DOC Improve documentation regarding some pitfalls in interpretation (…
jygerardy Jan 11, 2023
521136a
MAINT always seed make_classification in tests (#25353)
ogrisel Jan 11, 2023
cbf9d75
MNT minor clean-up of sklearn/conftests.py (#25358)
lesteve Jan 11, 2023
6931db3
CI Remove unused env var (#25359)
jeremiedbb Jan 11, 2023
4baa8ca
MNT [scipy-dev] [pypy] [azure parallel] update lock files (#25361)
lesteve Jan 11, 2023
d309fcc
TST use global_random_seed in sklearn/cluster/tests/test_hierarchical…
marenwestermann Jan 11, 2023
cbd9323
CI Use latest Cython sources in scipy-dev build (#25300)
lesteve Jan 11, 2023
82e3f50
DOC replace markdown by rst (#25368)
lesteve Jan 12, 2023
c3184ab
DOC update the documentation of fit of stateless transformers (#25191)
glemaitre Jan 12, 2023
e9b8c98
DOC Includes jquery to fix website (#25371)
thomasjpfan Jan 12, 2023
53c54f2
FIX Support read-only sparse datasets for `Tree`-based estimators (#2…
jjerphan Jan 12, 2023
efb15f4
DOC only use chi2 on binary and counts features (#24684)
glemaitre Jan 12, 2023
f02d2ba
DOC Adds sklearn-evaluation to related_projects (#25375)
idomic Jan 12, 2023
799520e
CI Migrate Linux ARM job to CirrusCI (#25366)
thomasjpfan Jan 12, 2023
19346c8
FIX skip space after delimiter in fetch_openml when using pandas pars…
glemaitre Jan 13, 2023
35a4161
CI Adds arm wheel build in cirrus CI (#25362)
thomasjpfan Jan 13, 2023
d5373ea
FIX Set TSNE's internal PCA to always use numpy as output (#25370)
betatim Jan 13, 2023
823cc44
DOC Adds logo back to navbar (#25382)
thomasjpfan Jan 13, 2023
c3344e3
CI Make no-OpenMP build fail with unprotected `cimport openmp` (#25391)
lesteve Jan 13, 2023
946123d
MAINT fix typo in comments of t-SNE code base (#25394)
steven2358 Jan 13, 2023
3f24f47
CI sanitize commit message for Azure (#25376)
ogrisel Jan 13, 2023
25b5140
Fix color maps of contour and scatter plots. (#25329)
i-aki-y Jan 14, 2023
caf2169
DOC fix typo in docstring of RandomizedSearchCV (#25396)
nzw0301 Jan 14, 2023
cda6001
DOC cross-reference the term metaestimator in SelfTrainingClassifier …
gunesbayir Jan 14, 2023
6849e51
CI Update conda-lock from 1.2.1 to 1.3.0 (#25404)
jjerphan Jan 16, 2023
e82c420
DOC fix name of estimator used when referring to code example (#25408)
betatim Jan 16, 2023
3905d41
MNT fix test following scipy dev change (#25393)
lesteve Jan 18, 2023
f36ea12
CI Adapt handling of discarded fused typed memoryview (#25425)
jjerphan Jan 18, 2023
dd72b37
DOC Fix typo in LogisticRegressionCV (#25428)
jeremiedbb Jan 18, 2023
649ee0d
MNT Reduces the number of runs for circleci redirector job (#25426)
thomasjpfan Jan 18, 2023
ac90578
CI Enable native osx-arm64 wheels on Python 3.8 (#25427)
thomasjpfan Jan 18, 2023
4423547
FIX SplineTransformer.get_feature_names_out returns correct names for…
thomasjpfan Jan 18, 2023
5b624d2
DOC Add detail about dataframe passthrough columns (#25423)
ScottMGustafson Jan 18, 2023
cad67c7
FIX Better support large or read-only datasets in `decomposition.Dict…
jjerphan Jan 19, 2023
14d2066
FIX online updates in MiniBatchDictionaryLearning (#25354)
jeremiedbb Jan 19, 2023
94fd968
DOC Rework Importance of Feature Scaling example (#25012)
ArturoAmorQ Jan 19, 2023
f690ce9
DOC Update "About Us" (#25435)
jjerphan Jan 20, 2023
a6d8642
DOC Improve visibility of warning message on example "Pitfalls in the…
ArturoAmorQ Jan 20, 2023
2d69986
DOC Update changelog before the 1.2.1 release (#25436)
jjerphan Jan 20, 2023
904c2ec
FIX propagate configuration to workers in parallel (#25363)
glemaitre Jan 20, 2023
a82c359
fixup! FIX Support read-only sparse datasets for `Tree`-based estimat…
jjerphan Jan 23, 2023
f77ed79
DOC Update date and contributors list for v1.2.1 (#25459)
jjerphan Jan 23, 2023
5b10569
MAINT Use 1.2.1 for the version number
jjerphan Jan 23, 2023
d9d6b48
[cd build] Trigger CI/CD
jjerphan Jan 23, 2023
99d59b8
Revert "MAINT update SECURITY.md (#25138)"
jjerphan Jan 23, 2023
b328b15
[scipy-dev] Trigger CI
jjerphan Jan 23, 2023
3d413e7
[cd build] Trigger CI/CD
jjerphan Jan 23, 2023
181331f
DOC Reorder whats_new/v1.2.rst (#25461)
jjerphan Jan 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 13 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,6 @@ jobs:
root: doc/_build/html
paths: .

linux-arm64:
machine:
image: ubuntu-2004:202101-01
resource_class: arm.medium
environment:
- OMP_NUM_THREADS: 2
- OPENBLAS_NUM_THREADS: 2
- CONDA_ENV_NAME: testenv
- LOCK_FILE: build_tools/circle/py39_conda_forge_linux-aarch64_conda.lock
steps:
- checkout
- run: ./build_tools/circle/checkout_merge_commit.sh
- restore_cache:
key: linux-arm64-{{ .Branch }}
- run: ./build_tools/circle/build_test_arm.sh
- save_cache:
key: linux-arm64-{{ .Branch }}
paths:
- ~/.cache/ccache
- ~/.cache/pip
- ~/scikit_learn_data
deploy:
docker:
- image: cimg/python:3.8.12
Expand All @@ -75,6 +54,17 @@ jobs:
bash build_tools/circle/push_doc.sh doc/_build/html/stable
fi

# This noop job is required for the pipeline to exist, so that the
# documentation related jobs can be triggered.
noop:
docker:
- image: cimg/python:3.8.12
steps:
- run: |
echo "This is no-op job for the pipeline to exist, so that it triggers "
echo "Circle CI jobs pushing the artifacts of the documentation built "
echo "via GitHub actions."

workflows:
version: 2

Expand All @@ -90,10 +80,10 @@ workflows:
requires:
- doc

linux-arm64:
noop:
when:
equal: [ "none", << pipeline.parameters.GITHUB_RUN_URL >> ]
# Prevent double execution of this job: on push
# by default and when triggered by the workflow
jobs:
- linux-arm64
- noop
35 changes: 35 additions & 0 deletions .cirrus.star
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This script uses starlark for configuring when a cirrus CI job runs:
# https://cirrus-ci.org/guide/programming-tasks/

load("cirrus", "env", "fs", "http")

def main(ctx):
# Only run for scikit-learn/scikit-learn. For debugging on a fork, you can
# comment out the following condition.
if env.get("CIRRUS_REPO_FULL_NAME") != "scikit-learn/scikit-learn":
return []

arm_wheel_yaml = "build_tools/cirrus/arm_wheel.yml"
arm_tests_yaml = "build_tools/cirrus/arm_tests.yml"

# Nightly jobs always run
if env.get("CIRRUS_CRON", "") == "nightly":
return fs.read(arm_wheel_yaml)

# Get commit message for event. We can not use `git` here because there is
# no command line access in starlark. Thus we need to query the GitHub API
# for the commit message. Note that `CIRRUS_CHANGE_MESSAGE` can not be used
# because it is set to the PR's title and not the latest commit message.
SHA = env.get("CIRRUS_CHANGE_IN_REPO")
REPO = env.get("CIRRUS_REPO_FULL_NAME")
url = "https://api.github.com/repos/" + REPO + "/git/commits/" + SHA
response = http.get(url).json()
commit_msg = response["message"]

if "[skip ci]" in commit_msg:
return []

if "[cd build]" in commit_msg or "[cd build cirrus]" in commit_msg:
return fs.read(arm_wheel_yaml)

return fs.read(arm_tests_yaml)
3 changes: 3 additions & 0 deletions .github/workflows/artifact-redirector.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: CircleCI artifacts redirector
on: [status]
jobs:
circleci_artifacts_redirector_job:
runs-on: ubuntu-latest
# For testing this action on a fork, remove the "github.repository =="" condition.
if: "github.repository == 'scikit-learn/scikit-learn' && github.event.context == 'ci/circleci: doc'"
name: Run CircleCI artifacts redirector
steps:
- name: GitHub Action step
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/trigger-hosting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ jobs:
- name: Trigger hosting jobs
run: bash build_tools/github/trigger_hosting.sh
env:
# Note: the CIRCLE_CI_TOKEN needs to be a user token instead of a
# project-wide token created using:
#
# https://support.circleci.com/hc/en-us/articles/360050351292-How-to-Trigger-a-Workflow-via-CircleCI-API-v2
#
# At the time of writing, secrets.CIRCLE_CI_TOKEN is valued with a
# token created using the ogrisel circleci account using:
# https://app.circleci.com/settings/user/tokens
CIRCLE_CI_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }}
EVENT: ${{ github.event.workflow_run.event }}
RUN_ID: ${{ github.event.workflow_run.id }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,12 @@ jobs:
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir}
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }}
CIBW_TEST_REQUIRES: pytest pandas threadpoolctl
CIBW_TEST_COMMAND: bash {project}/build_tools/github/test_wheels.sh
CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh
CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }}
CIBW_BUILD_VERBOSITY: 1
CONDA_HOME: /usr/local/miniconda

run: bash build_tools/github/build_wheels.sh
run: bash build_tools/wheels/build_wheels.sh

- name: Store artifacts
uses: actions/upload-artifact@v3
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ recursive-exclude maint_tools *
recursive-exclude benchmarks *
recursive-exclude .binder *
recursive-exclude .circleci *
exclude .cirrus.star
exclude .codecov.yml
exclude .git-blame-ignore-revs
exclude .mailmap
Expand Down
26 changes: 15 additions & 11 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
LOCK_FILE: './build_tools/azure/pylatest_pip_scipy_dev_linux-64_conda.lock'
CHECK_WARNINGS: 'true'
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
TEST_DOCSTRINGS: 'true'
# Tests that require large downloads over the networks are skipped in CI.
# Here we make sure, that they are still run on a regular basis.
SKLEARN_SKIP_NETWORK_TESTS: '0'
Expand Down Expand Up @@ -146,7 +145,12 @@ jobs:
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '42' # default global random seed

# Check compilation with Ubuntu 22.04 LTS (Jammy Jellyfish) and scipy from conda-forge
- template: build_tools/azure/posix.yml
# By default the CI is sequential, where `Ubuntu_Jammy_Jellyfish` runs first and
# the others jobs are run only if `Ubuntu_Jammy_Jellyfish` succeeds.
# When "[azure parallel]" is in the commit message, `Ubuntu_Jammy_Jellyfish` will
# run in parallel with the rest of the jobs. On Azure, the job's name will be
# `Ubuntu_Jammy_Jellyfish_Parallel`.
- template: build_tools/azure/posix-all-parallel.yml
parameters:
name: Ubuntu_Jammy_Jellyfish
vmImage: ubuntu-22.04
Expand All @@ -156,6 +160,7 @@ jobs:
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
commitMessage: dependencies['git_commit']['outputs']['commit.message']
matrix:
py38_conda_forge_openblas_ubuntu_2204:
DISTRIB: 'conda'
Expand All @@ -167,10 +172,10 @@ jobs:
parameters:
name: Linux
vmImage: ubuntu-20.04
dependsOn: [linting, git_commit]
dependsOn: [linting, git_commit, Ubuntu_Jammy_Jellyfish]
condition: |
and(
succeeded(),
in(dependencies['Ubuntu_Jammy_Jellyfish']['result'], 'Succeeded', 'Skipped'),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
Expand All @@ -195,18 +200,17 @@ jobs:
DISTRIB: 'conda-pip-latest'
LOCK_FILE: './build_tools/azure/pylatest_pip_openblas_pandas_linux-64_conda.lock'
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
TEST_DOCSTRINGS: 'true'
CHECK_WARNINGS: 'true'
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '3' # non-default seed

- template: build_tools/azure/posix-docker.yml
parameters:
name: Linux_Docker
vmImage: ubuntu-20.04
dependsOn: [linting, git_commit]
dependsOn: [linting, git_commit, Ubuntu_Jammy_Jellyfish]
condition: |
and(
succeeded(),
in(dependencies['Ubuntu_Jammy_Jellyfish']['result'], 'Succeeded', 'Skipped'),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
Expand All @@ -222,10 +226,10 @@ jobs:
parameters:
name: macOS
vmImage: macOS-11
dependsOn: [linting, git_commit]
dependsOn: [linting, git_commit, Ubuntu_Jammy_Jellyfish]
condition: |
and(
succeeded(),
in(dependencies['Ubuntu_Jammy_Jellyfish']['result'], 'Succeeded', 'Skipped'),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
Expand All @@ -244,10 +248,10 @@ jobs:
parameters:
name: Windows
vmImage: windows-latest
dependsOn: [linting, git_commit]
dependsOn: [linting, git_commit, Ubuntu_Jammy_Jellyfish]
condition: |
and(
succeeded(),
in(dependencies['Ubuntu_Jammy_Jellyfish']['result'], 'Succeeded', 'Skipped'),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
Expand Down
3 changes: 1 addition & 2 deletions benchmarks/bench_saga.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import time
import os

from joblib import Parallel
from sklearn.utils.fixes import delayed
from sklearn.utils.parallel import delayed, Parallel
import matplotlib.pyplot as plt
import numpy as np

Expand Down
14 changes: 6 additions & 8 deletions build_tools/azure/debian_atlas_32bit_lock.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile --output-file=build_tools/azure/debian_atlas_32bit_lock.txt build_tools/azure/debian_atlas_32bit_requirements.txt
#
attrs==22.1.0
attrs==22.2.0
# via pytest
cython==0.29.32
cython==0.29.33
# via -r build_tools/azure/debian_atlas_32bit_requirements.txt
joblib==1.1.1
# via -r build_tools/azure/debian_atlas_32bit_requirements.txt
more-itertools==9.0.0
# via pytest
packaging==21.3
packaging==23.0
# via pytest
pluggy==0.13.1
# via pytest
py==1.11.0
# via pytest
pyparsing==3.0.9
# via packaging
pytest==5.3.1
# via -r build_tools/azure/debian_atlas_32bit_requirements.txt
threadpoolctl==2.2.0
# via -r build_tools/azure/debian_atlas_32bit_requirements.txt
wcwidth==0.2.5
wcwidth==0.2.6
# via pytest
13 changes: 13 additions & 0 deletions build_tools/azure/get_commit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@ def get_commit_message():
else:
commit_message = build_source_version_message

# Sanitize the commit message to avoid introducing a vulnerability: a PR
# submitter could include the "##vso" special marker in their commit
# message to attempt to obfuscate the injection of arbitrary commands in
# the Azure pipeline.
#
# This can be a problem if the PR reviewers do not pay close enough
# attention to the full commit message prior to clicking the merge button
# and as a result make the inject code run in a protected branch with
# elevated access to CI secrets. On a protected branch, Azure
# already sanitizes `BUILD_SOURCEVERSIONMESSAGE`, but the message
# will still be sanitized here out of precaution.
commit_message = commit_message.replace("##vso", "..vso")

return commit_message


Expand Down
15 changes: 10 additions & 5 deletions build_tools/azure/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ setup_ccache() {

pre_python_environment_install() {
if [[ "$DISTRIB" == "ubuntu" ]]; then
sudo add-apt-repository --remove ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install python3-scipy python3-matplotlib \
libatlas3-base libatlas-base-dev python3-virtualenv ccache
Expand Down Expand Up @@ -84,11 +83,11 @@ python_environment_install_and_activate() {
echo "Installing development dependency wheels"
dev_anaconda_url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy pandas scipy
echo "Installing Cython from PyPI enabling pre-releases"
pip install --pre cython
echo "Installing joblib master"
echo "Installing Cython from latest sources"
pip install https://github.com/cython/cython/archive/master.zip
echo "Installing joblib from latest sources"
pip install https://github.com/joblib/joblib/archive/master.zip
echo "Installing pillow master"
echo "Installing pillow from latest sources"
pip install https://github.com/python-pillow/Pillow/archive/main.zip
fi
}
Expand All @@ -105,6 +104,12 @@ scikit_learn_install() {
# Without openmp, we use the system clang. Here we use /usr/bin/ar
# instead because llvm-ar errors
export AR=/usr/bin/ar
# Make sure omp.h is not present in the conda environment, so that
# using an unprotected "cimport openmp" will make this build fail. At
# the time of writing (2023-01-13), on OSX, blas (mkl or openblas)
# brings in openmp so that you end up having the omp.h include inside
# the conda environment.
find $CONDA_PREFIX -name omp.h -delete -print
fi

if [[ "$UNAMESTR" == "Linux" ]]; then
Expand Down
15 changes: 10 additions & 5 deletions build_tools/azure/linting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,15 @@ then
exit 1
fi

joblib_import="$(git grep -l -A 10 -E "joblib import.+delayed" -- "*.py" ":!sklearn/utils/_joblib.py" ":!sklearn/utils/fixes.py")"

if [ ! -z "$joblib_import" ]; then
echo "Use from sklearn.utils.fixes import delayed instead of joblib delayed. The following files contains imports to joblib.delayed:"
echo "$joblib_import"
joblib_delayed_import="$(git grep -l -A 10 -E "joblib import.+delayed" -- "*.py" ":!sklearn/utils/_joblib.py" ":!sklearn/utils/parallel.py")"
if [ ! -z "$joblib_delayed_import" ]; then
echo "Use from sklearn.utils.parallel import delayed instead of joblib delayed. The following files contains imports to joblib.delayed:"
echo "$joblib_delayed_import"
exit 1
fi
joblib_Parallel_import="$(git grep -l -A 10 -E "joblib import.+Parallel" -- "*.py" ":!sklearn/utils/_joblib.py" ":!sklearn/utils/parallel.py")"
if [ ! -z "$joblib_Parallel_import" ]; then
echo "Use from sklearn.utils.parallel import Parallel instead of joblib Parallel. The following files contains imports to joblib.Parallel:"
echo "$joblib_Parallel_import"
exit 1
fi