8000 Release 0.24.1 by glemaitre · Pull Request #19199 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Release 0.24.1 #19199

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 38 commits into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
57b0f18
DOC 0.24.0 release highlights formatting (#19059)
ogrisel Dec 22, 2020
319bc39
MNT update the number of wheels generated to upload to PyPI
glemaitre Dec 22, 2020
203fb7c
MNT fix publish to pypi conditions
glemaitre Dec 22, 2020
e467ba8
CI Publish to Pypi workflow for aarch64 wheels (#19060)
thomasjpfan Dec 22, 2020
d9bdc06
DOC typo correction in neighbors.rst (#19099)
haochuanwei Jan 4, 2021
665a389
DOC fix dataset used for visualization in digits classification examp…
yzhenman Jan 4, 2021
5be5808
DOC Fix cross-validation wording in RidgeCV (#19121)
paw-lu Jan 6, 2021
98bcc24
TST Skips test_compare_to_ELKI for arm (#19115)
thomasjpfan Jan 6, 2021
110333f
CI Reduce travis nightly load (#19113)
ogrisel Jan 6, 2021
867cf5f
DOC Fix docstring of HalvingSearch estimators (#19133)
shinnar Jan 8, 2021
59f6ec9
FIX accept meta-estimator in SelfTrainingClassifier (#19126)
glemaitre Jan 8, 2021
f317ead
DOC Fix typo in datasets.rst (#19136)
connortann Jan 8, 2021
e4a63db
DOC Update docs guideline regarding docstring formatting (#18243)
glemaitre Jan 8, 2021
3ebe1a5
DOC Update docs for StandardScaler.scale_ to include 0 variance (#19124)
KunjParikh Jan 9, 2021
890caa4
CI Use macos-10.13 compatible libomp when building the wheels (#19064)
ogrisel Jan 11, 2021
7168e14
DOC minor broken links fix in parallelism docs (#19151)
NicolasHug Jan 11, 2021
bbc46f3
DOC Adds default to SpectralClustering (#19149)
thomasjpfan Jan 11, 2021
4638944
DOC Update installation instructions for macos/arm64 (#19146)
ogrisel Jan 11, 2021
e3caae6
DOC Mention to use a command prompt in Windows install (#19125)
Hephaest Jan 11, 2021
3ae054f
DOC Uses float instead of real in cross_decomposition (#19156)
thomasjpfan Jan 12, 2021
fcc49e0
MNT Replace PDF build by ZIP of the HTML (#17564)
alfaro96 Jan 12, 2021
7baf758
DOC Normalization of linear_model decision_function (#19142)
stootoon Jan 13, 2021
1e4d756
CI Adds skipping to azure pipelines with commit message (#19134)
thomasjpfan Jan 13, 2021
cd62f8b
DOC Clarifies docstrings in decomposition (#19161)
thomasjpfan Jan 13, 2021
957781f
MNT fix strict comparison in version listing (#19163)
alfaro96 Jan 13, 2021
300782f
TST Download datasets before running pytest-xdist (#19118)
thomasjpfan Jan 13, 2021
ff77844
CI Use stable numpy scipy release for [icc-build] and [arm64] on trav…
ogrisel Jan 14, 2021
0f93f76
FIX Fixes issue with exatly_zero_info_score (#19179)
thomasjpfan Jan 16, 2021
a837abe
DOC description for Calinski-Harabasz Index (#19167)
zitorelova Jan 16, 2021
dc59bc1
DOC Add link to video for contributing: Andreas video Volume 2 (#19180)
ranjanikrishnan Jan 17, 2021
a4df528
DOC Replacing swarmplot with stripplot to avoid seaborn warning (#19195)
abhinavtps Jan 18, 2021
e79b516
DOC add entry in whats new for 0.24.1 (#19196)
glemaitre Jan 18, 2021
a9fd32c
DOC update the version and year release
glemaitre Jan 18, 2021
a7b9f31
DOC add entry in whats new for numerical instability in mutual inform…
glemaitre Jan 18, 2021
eee3918
TST Adapts wminkowski for scipy 1.6.0 (#19096)
thomasjpfan Jan 5, 2021
4c3f0dc
TST Fix scipy DeprecationWarning from wminkowski in nightly (#18930)
cmarmo Jan 2, 2021
cbb9320
Trigger wheel builder workflow: [cd build]
glemaitre Jan 19, 2021
cf21428
DOC fix year release 0.24.1
glemaitre Jan 19, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
user: __token__
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository_url: https://test.pypi.org/legacy/
if: ${{ github.event.inputs.pypi_repo }} == 'testpypi'
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@v1.4.1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
if: ${{ github.event.inputs.pypi_repo }} == 'pypi'
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
1 change: 1 addition & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ jobs:
OPENBLAS_NUM_THREADS=2
SKLEARN_SKIP_NETWORK_TESTS=1
SKLEARN_BUILD_PARALLEL=3
MACOSX_DEPLOYMENT_TARGET=10.13
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }}
CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }}
Expand Down
14 changes: 10 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,21 @@ jobs:
- BUILD_WITH_ICC=true
if: type = cron OR commit_message =~ /\[icc-build\]/

- python: 3.7
# Manual trigger of linux/arm64 tests in PR without triggering the full
# wheel building process for all the Python versions.
- python: 3.9
os: linux
arch: arm64
if: type = cron OR commit_message =~ /\[arm64\]/
if: commit_message =~ /\[arm64\]/
env:
- CPU_COUNT=8

# Linux environments to build the scikit-learn wheels
# for the ARM64 arquitecture and Python 3.6 and newer
# 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
# 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 master branch. The
# weekly frequency is meant to avoid depleting the Travis CI credits too
# fast.
- python: 3.6
os: linux
arch: arm64
Expand Down
117 changes: 71 additions & 46 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,65 @@ schedules:
always: true

jobs:
- job: linting
displayName: Linting
- job: git_commit
displayName: Get Git Commit
pool:
vmImage: ubuntu-18.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
- bash: |
pip install flake8 mypy==0.782
displayName: Install linters
- bash: |
set -ex
if [[ $BUILD_REASON == "PullRequest" ]]; then
# By default pull requests use refs/pull/PULL_ID/merge as the source branch
# which has a "Merge ID into ID" as a commit message. The latest commit
# message is the second to last commit
COMMIT_ID=$(echo $BUILD_SOURCEVERSIONMESSAGE | awk '{print $2}')
COMMIT_MESSAGE=$(git log $COMMIT_ID -1 --pretty=%B)
message=$(git log $COMMIT_ID -1 --pretty=%B)
else
COMMIT_MESSAGE=$BUILD_SOURCEVERSIONMESSAGE
message=$BUILD_SOURCEVERSIONMESSAGE
fi
echo "##vso[task.setvariable variable=COMMIT_MESSAGE]$COMMIT_MESSAGE"
echo "##vso[task.setvariable variable=message;isOutput=true]$message"
name: commit
displayName: Get source version message

- job: linting
dependsOn: [git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[lint skip]')),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
displayName: Linting
pool:
vmImage: ubuntu-18.04
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
- bash: |
set -ex
if [[ "$COMMIT_MESSAGE" =~ "[lint skip]" ]]; then
# skip linting
echo "Skipping flake8 linting"
exit 0
else
./build_tools/circle/linting.sh
fi
pip install flake8 mypy==0.782
displayName: Install linters
- bash: |
./build_tools/circle/linting.sh
displayName: Run linting
- bash: |
set -ex
if [[ "$COMMIT_MESSAGE" =~ "[lint skip]" ]]; then
# skip linting
echo "Skipping mypy linting"
exit 0
else
mypy sklearn/
fi
mypy sklearn/
displayName: Run mypy
- bash: |
if [[ "$COMMIT_MESSAGE" =~ "[scipy-dev]" ]] || [[ $BUILD_REASON == "Schedule" ]]; then
echo "Running scipy-dev"
echo "##vso[task.setvariable variable=runScipyDev;isOutput=true]true"
else
echo "##vso[task.setvariable variable=runScipyDev;isOutput=true]false"
fi
name: gitCommitMessage
displayName: Determine to run scipy-dev

- template: build_tools/azure/posix.yml
parameters:
name: Linux_Nightly
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: eq(dependencies['linting']['outputs']['gitCommitMessage.runScipyDev'], 'true')
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'], '[scipy-dev]'
)
)
)
matrix:
pylatest_pip_scipy_dev:
DISTRIB: 'conda-pip-scipy-dev'
Expand All @@ -84,6 +83,12 @@ jobs:
parameters:
name: Linux_Runs
vmImage: ubuntu-18.04
dependsOn: [git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]'))
)
matrix:
pylatest_conda_mkl:
DISTRIB: 'conda'
Expand All @@ -95,8 +100,13 @@ jobs:
parameters:
name: Linux
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
dependsOn: [linting, git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
ne(variables['Build.Reason'], 'Schedule')
)
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
Expand Down Expand Up @@ -139,8 +149,13 @@ jobs:
parameters:
name: Linux32
vmImage: ubuntu-18.04
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
dependsOn: [linting, git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
ne(variables['Build.Reason'], 'Schedule')
)
matrix:
py36_ubuntu_atlas_32bit:
DISTRIB: 'ubuntu-32'
Expand All @@ -157,8 +172,13 @@ jobs:
parameters:
name: macOS
vmImage: macOS-10.14
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
dependsOn: [linting, git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
ne(variables['Build.Reason'], 'Schedule')
)
matrix:
pylatest_conda_forge_mkl:
DISTRIB: 'conda'
Expand All @@ -174,8 +194,13 @@ jobs:
parameters:
name: Windows
vmImage: vs2017-win2016
dependsOn: [linting]
condition: and(ne(variables['Build.Reason'], 'Schedule'), succeeded('linting'))
dependsOn: [linting, git_commit]
condition: |
and(
succeeded(),
not(contains(dependencies['git_commit']['outputs']['commit.message'], '[ci skip]')),
ne(variables['Build.Reason'], 'Schedule')
)
matrix:
py37_conda_mkl:
PYTHON_VERSION: '3.7'
Expand Down
11 changes: 4 additions & 7 deletions build_tools/circle/build_doc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ fi

if [[ "$CIRCLE_BRANCH" =~ ^master$|^[0-9]+\.[0-9]+\.X$ && -z "$CI_PULL_REQUEST" ]]
then
# PDF linked into HTML
make_args="dist LATEXMKOPTS=-halt-on-error"
# ZIP linked into HTML
make_args=dist
elif [[ "$build_type" =~ ^QUICK ]]
then
make_args=html-noplot
Expand All @@ -133,13 +133,10 @@ fi
make_args="SPHINXOPTS=-T $make_args" # show full traceback on exception

# Installing required system packages to support the rendering of math
# notation in the HTML documentation
# notation in the HTML documentation and to optimize the image files
sudo -E apt-get -yq update
sudo -E apt-get -yq remove texlive-binaries --purge
sudo -E apt-get -yq --no-install-suggests --no-install-recommends \
install dvipng texlive-latex-base texlive-latex-extra \
texlive-latex-recommended texlive-fonts-recommended \
latexmk gsfonts ccache
install dvipng gsfonts ccache zip optipng

# deactivate circleci virtualenv and setup a miniconda env instead
if [[ `type -t deactivate` ]]; then
Expand Down
31 changes: 23 additions & 8 deletions build_tools/circle/list_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from distutils.version import LooseVersion
from urllib.request import urlopen


def json_urlread(url):
try:
return json.loads(urlopen(url).read().decode('utf8'))
Expand All @@ -32,10 +33,23 @@ def human_readable_data_quantity(quantity, multiple=1024):
quantity /= multiple


def get_pdf_size(version):
def get_file_extension(version):
if 'dev' in version:
# The 'dev' branch should be explictly handled
return 'zip'

current_version = LooseVersion(version)
min_zip_version = LooseVersion('1.0.0')

return 'zip' if current_version >= min_zip_version else 'pdf'


def get_file_size(version):
api_url = ROOT_URL + '%s/_downloads' % version
for path_details in json_urlread(api_url):
if path_details['name'] == 'scikit-learn-docs.pdf':
file_extension = get_file_extension(version)
file_path = f'scikit-learn-docs.{file_extension}'
if path_details['name'] == file_path:
return human_readable_data_quantity(path_details['size'], 1000)


Expand Down Expand Up @@ -64,8 +78,8 @@ def get_pdf_size(version):
if path_details['type'] == 'dir':
html = urlopen(RAW_FMT % name).read().decode('utf8')
version_num = VERSION_RE.search(html).group(1)
pdf_size = get_pdf_size(name)
dirs[name] = (version_num, pdf_size)
file_size = get_file_size(name)
dirs[name] = (version_num, file_size)

if path_details['type'] == 'symlink':
symlinks[name] = json_urlread(path_details['_links']['self'])['target']
Expand All @@ -81,7 +95,7 @@ def get_pdf_size(version):
for name in (NAMED_DIRS +
sorted((k for k in dirs if k[:1].isdigit()),
key=LooseVersion, reverse=True)):
version_num, pdf_size = dirs[name]
version_num, file_size = dirs[name]
if version_num in seen:
# symlink came first
continue
Expand All @@ -91,7 +105,8 @@ def get_pdf_size(version):
path = 'https://scikit-learn.org/%s/' % name
out = ('* `Scikit-learn %s%s documentation <%s>`_'
% (version_num, name_display, path))
if pdf_size is not None:
out += (' (`PDF %s <%s/_downloads/scikit-learn-docs.pdf>`_)'
% (pdf_size, path))
if file_size is not None:
file_extension = get_file_extension(version_num)
out += (f' (`{file_extension.upper()} {file_size} <{path}/'
f'_downloads/scikit-learn-docs.{file_extension}>`_)')
print(out)
10 changes: 9 additions & 1 deletion build_tools/github/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ set -x

# OpenMP is not present on macOS by default
if [[ "$RUNNER_OS" == "macOS" ]]; then
brew install libomp
# Make sure to use a libomp version binary compatible with the oldest
# supported version of the macos SDK as libomp will be vendored into the
# scikit-learn wheels for macos. The list of bottles can be found at:
# https://formulae.brew.sh/api/formula/libomp.json. Currently, the oldest
# supported macos version is: High Sierra / 10.13. When upgrading this, be
# sure to update the MACOSX_DEPLOYMENT_TARGET environment variable in
# wheels.yml accordingly.
wget https://homebrew.bintray.com/bottles/libomp-11.0.0.high_sierra.bottle.tar.gz
brew install libomp-11.0.0.high_sierra.bottle.tar.gz
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"
Expand Down
10 changes: 10 additions & 0 deletions build_tools/github/check_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
# plus one more for the sdist
n_wheels += 1

# aarch64 builds from travis
travis_config_path = Path.cwd() / ".travis.yml"
with travis_config_path.open('r') as f:
travis_config = yaml.safe_load(f)

jobs = travis_config['jobs']['include']
travis_builds = [j for j in jobs
if any("CIBW_BUILD" in env for env in j["env"])]
n_wheels += len(travis_builds)

dist_files = list(Path("dist").glob('**/*'))
n_dist_files = len(dist_files)

Expand Down
19 changes: 2 additions & 17 deletions build_tools/travis/install_master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,8 @@ conda update --yes conda
conda create -n testenv --yes python=3.7

source activate testenv

if [[ $TRAVIS_CPU_ARCH == amd64 ]]; then
echo "Upgrading pip and setuptools."
pip install --upgrade pip setuptools
echo "Installing numpy, scipy and pandas master wheels."
dev_anaconda_url=https://pypi.anaconda.org/scipy-wheels-nightly/simple
pip install --pre --upgrade --timeout=60 --extra-index $dev_anaconda_url numpy scipy pandas
echo "Installing cython pre-release wheels."
pip install --pre cython
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
else
conda install -y scipy numpy pandas cython
pip install joblib threadpoolctl
fi
conda install -y scipy numpy pandas cython
pip install joblib threadpoolctl

pip install $(get_dep pytest $PYTEST_VERSION) pytest-xdist

Expand Down
Loading
0