Skip to content

Commit aa17ea1

Browse files
committed
Merge remote-tracking branch 'upstream/master' into test_mean_shift
2 parents dea8840 + 26f6909 commit aa17ea1

File tree

413 files changed

+13757
-17803
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+13757
-17803
lines changed

.circleci/config.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
doc-min-dependencies:
55
docker:
6-
- image: circleci/python:3.6.1
6+
- image: circleci/python:3.6
77
environment:
88
- MINICONDA_PATH: ~/miniconda
99
- CONDA_ENV_NAME: testenv
@@ -32,7 +32,7 @@ jobs:
3232

3333
doc:
3434
docker:
35-
- image: circleci/python:3.6.1
35+
- image: circleci/python:3.6
3636
environment:
3737
- MINICONDA_PATH: ~/miniconda
3838
- CONDA_ENV_NAME: testenv
@@ -61,7 +61,7 @@ jobs:
6161

6262
lint:
6363
docker:
64-
- image: circleci/python:3.6.1
64+
- image: circleci/python:3.6
6565
steps:
6666
- checkout
6767
- run: ./build_tools/circle/checkout_merge_commit.sh
@@ -90,7 +90,7 @@ jobs:
9090

9191
deploy:
9292
docker:
93-
- image: circleci/python:3.6.1
93+
- image: circleci/python:3.6
9494
steps:
9595
- checkout
9696
- run: ./build_tools/circle/checkout_merge_commit.sh
@@ -109,9 +109,13 @@ workflows:
109109
version: 2
110110
build-doc-and-deploy:
111111
jobs:
112-
- doc
113-
- doc-min-dependencies
114112
- lint
113+
- doc:
114+
requires:
115+
- lint
116+
- doc-min-dependencies:
117+
requires:
118+
- lint
115119
- pypy3:
116120
filters:
117121
branches:

.codecov.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ coverage:
1919
# https://github.com/codecov/browser-extension
2020
target: auto
2121
threshold: 1%
22-
22+
23+
ignore:
24+
- "sklearn/externals"

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,8 @@ _configtest.o.d
7171

7272
# Used by mypy
7373
.mypy_cache/
74+
75+
# files generated from a template
76+
sklearn/utils/seq_dataset.pyx
77+
sklearn/utils/seq_dataset.pxd
78+
sklearn/linear_model/sag_fast.pyx

.travis.yml

+1-39
Original file line numberDiff line numberDiff line change
@@ -20,44 +20,6 @@ env:
2020

2121
matrix:
2222
include:
23-
# Latest dependencies on macOS with MKL
24-
- env: DISTRIB="conda" PYTHON_VERSION="*" INSTALL_MKL="true"
25-
NUMPY_VERSION="*" SCIPY_VERSION="*" CYTHON_VERSION="*"
26-
PILLOW_VERSION="*" JOBLIB_VERSION="*" COVERAGE=true
27-
language: generic
28-
if: type != cron
29-
os: osx
30-
# Linux environment to test that scikit-learn can be built against
31-
# versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04
32-
# i.e. numpy 1.11 and scipy 0.17
33-
- env: DISTRIB="ubuntu" PYTHON_VERSION="3.5"
34-
NUMPY_VERSION="1.11.0" SCIPY_VERSION="0.17.0"
35-
PILLOW_VERSION="4.0.0" COVERAGE=true
36-
SKLEARN_SITE_JOBLIB=1 JOBLIB_VERSION="0.11"
37-
if: type != cron
38-
addons:
39-
apt:
40-
packages:
41-
# these only required by the DISTRIB="ubuntu" builds:
42-
- python3-scipy
43-
- libatlas3-base
44-
- libatlas-base-dev
45-
- libatlas-dev
46-
# Linux + Python 3.5 build with OpenBLAS and without SITE_JOBLIB
47-
- env: DISTRIB="conda" PYTHON_VERSION="3.5" INSTALL_MKL="false"
48-
NUMPY_VERSION="1.11.0" SCIPY_VERSION="0.17.0" CYTHON_VERSION="*"
49-
PILLOW_VERSION="4.0.0" COVERAGE=true
50-
if: type != cron
51-
# Linux environment to test the latest available dependencies and MKL.
52-
# It runs tests requiring pandas and PyAMG.
53-
# It also runs with the site joblib instead of the vendored copy of joblib.
54-
- env: DISTRIB="conda" PYTHON_VERSION="*" INSTALL_MKL="true"
55-
NUMPY_VERSION="*" SCIPY_VERSION="*" PANDAS_VERSION="*"
56-
CYTHON_VERSION="*" PYAMG_VERSION="*" PILLOW_VERSION="*"
57-
JOBLIB_VERSION="*" COVERAGE=true
58-
CHECK_PYTEST_SOFT_DEPENDENCY="true" TEST_DOCSTRINGS="true"
59-
SKLEARN_SITE_JOBLIB=1 CHECK_WARNINGS="true"
60-
if: type != cron
6123
# Linux environment to test scikit-learn against numpy and scipy master
6224
# installed from their CI wheels in a virtualenv with the Python
6325
# interpreter provided by travis.
@@ -66,7 +28,7 @@ matrix:
6628
if: type = cron OR commit_message =~ /\[scipy-dev\]/
6729

6830
install: source build_tools/travis/install.sh
69-
script:
31+
script:
7032
- bash build_tools/travis/test_script.sh
7133
- bash build_tools/travis/test_docs.sh
7234
- bash build_tools/travis/test_pytest_soft_dependency.sh

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ code-analysis:
6060
pylint -E -i y sklearn/ -d E1103,E0611,E1101
6161

6262
flake8-diff:
63-
./build_tools/travis/flake8_diff.sh
63+
./build_tools/circle/flake8_diff.sh

README.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
.. -*- mode: rst -*-
22
3-
|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |Python35|_ |PyPi|_ |DOI|_
3+
|Azure|_ |Travis|_ |Codecov|_ |CircleCI|_ |Python35|_ |PyPi|_ |DOI|_
4+
5+
.. |Azure| image:: https://dev.azure.com/scikit-learn/scikit-learn/_apis/build/status/scikit-learn.scikit-learn?branchName=master
6+
.. _Azure: https://dev.azure.com/scikit-learn/scikit-learn/_build/latest?definitionId=1&branchName=master
47

58
.. |Travis| image:: https://api.travis-ci.org/scikit-learn/scikit-learn.svg?branch=master
69
.. _Travis: https://travis-ci.org/scikit-learn/scikit-learn
710

8-
.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/scikit-learn/scikit-learn?branch=master&svg=true
9-
.. _AppVeyor: https://ci.appveyor.com/project/sklearn-ci/scikit-learn/history
10-
1111
.. |Codecov| image:: https://codecov.io/github/scikit-learn/scikit-learn/badge.svg?branch=master&service=github
1212
.. _Codecov: https://codecov.io/github/scikit-learn/scikit-learn?branch=master
1313

appveyor.yml

+7
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ install:
6464
# Install the generated wheel package to test it
6565
- "pip install --pre --no-index --find-links dist/ scikit-learn"
6666

67+
# If there is a newer build queued for the same PR, cancel this one.
68+
# credits: JuliaLang developers.
69+
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
70+
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=500).builds | `
71+
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
72+
throw "There are newer queued builds for this pull request, failing early." }
73+
6774
# Not a .NET project, we build scikit-learn in the install step instead
6875
build: false
6976

azure-pipelines.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Adapted from https://github.com/pandas-dev/pandas/blob/master/azure-pipelines.yml
2+
jobs:
3+
- template: build_tools/azure/posix.yml
4+
parameters:
5+
name: Linux
6+
vmImage: ubuntu-16.04
7+
matrix:
8+
# Linux environment to test that scikit-learn can be built against
9+
# versions of numpy, scipy with ATLAS that comes with Ubuntu Xenial 16.04
10+
# i.e. numpy 1.11 and scipy 0.17
11+
py35_np_atlas:
12+
DISTRIB: 'ubuntu'
13+
PYTHON_VERSION: '3.5'
14+
SKLEARN_SITE_JOBLIB: '1'
15+
JOBLIB_VERSION: '0.11'
16+
# Linux + Python 3.5 build with OpenBLAS and without SITE_JOBLIB
17+
py35_conda_openblas:
18+
DISTRIB: 'conda'
19+
PYTHON_VERSION: '3.5'
20+
INSTALL_MKL: 'false'
21+
NUMPY_VERSION: '1.11.0'
22+
SCIPY_VERSION: '0.17.0'
23+
CYTHON_VERSION: '*'
24+
PILLOW_VERSION: '4.0.0'
25+
COVERAGE: 'true'
26+
# Linux environment to test the latest available dependencies and MKL.
27+
# It runs tests requiring pandas and PyAMG.
28+
# It also runs with the site joblib instead of the vendored copy of joblib.
29+
pylatest_conda:
30+
DISTRIB: 'conda'
31+
PYTHON_VERSION: '*'
32+
INSTALL_MKL: 'true'
33+
NUMPY_VERSION: '*'
34+
SCIPY_VERSION: '*'
35+
PANDAS_VERSION: '*'
36+
CYTHON_VERSION: '*'
37+
PYAMG_VERSION: '*'
38+
PILLOW_VERSION: '*'
39+
JOBLIB_VERSION: '*'
40+
COVERAGE: 'true'
41+
CHECK_PYTEST_SOFT_DEPENDENCY: 'true'
42+
TEST_DOCSTRINGS: 'true'
43+
SKLEARN_SITE_JOBLIB: '1'
44+
CHECK_WARNINGS: 'true'
45+
46+
- template: build_tools/azure/posix.yml
47+
parameters:
48+
name: macOS
49+
vmImage: xcode9-macos10.13
50+
matrix:
51+
pylatest_conda:
52+
DISTRIB: 'conda'
53+
PYTHON_VERSION: '*'
54+
INSTALL_MKL: 'true'
55+
NUMPY_VERSION: '*'
56+
SCIPY_VERSION: '*'
57+
CYTHON_VERSION: '*'
58+
PILLOW_VERSION: '*'
59+
JOBLIB_VERSION: '*'
60+
COVERAGE: 'true'
61+
62+
- template: build_tools/azure/windows.yml
63+
parameters:
64+
name: Windows
65+
vmImage: vs2017-win2016
66+
matrix:
67+
py37_64:
68+
PYTHON_VERSION: '3.7'
69+
CHECK_WARNINGS: 'true'
70+
PYTHON_ARCH: '64'
71+
COVERAGE: 'true'
72+
py35_32:
73+
PYTHON_VERSION: '3.5'
74+
PYTHON_ARCH: '32'

benchmarks/bench_plot_lasso_path.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import numpy as np
1111

12-
from sklearn.linear_model import lars_path
12+
from sklearn.linear_model import lars_path, lars_path_gram
1313
from sklearn.linear_model import lasso_path
1414
from sklearn.datasets.samples_generator import make_regression
1515

@@ -45,7 +45,7 @@ def compute_bench(samples_range, features_range):
4545
tstart = time()
4646
G = np.dot(X.T, X) # precomputed Gram matrix
4747
Xy = np.dot(X.T, y)
48-
lars_path(X, y, Xy=Xy, Gram=G, method='lasso')
48+
lars_path_gram(Xy=Xy, Gram=G, n_samples=y.size, method='lasso')
4949
delta = time() - tstart
5050
print("%0.3fs" % delta)
5151
results['lars_path (with Gram)'].append(delta)

benchmarks/bench_plot_omp_lars.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import numpy as np
1111

12-
from sklearn.linear_model import lars_path, orthogonal_mp
12+
from sklearn.linear_model import lars_path, lars_path_gram, orthogonal_mp
1313
from sklearn.datasets.samples_generator import make_sparse_coded_signal
1414

1515

@@ -58,7 +58,8 @@ def compute_bench(samples_range, features_range):
5858
tstart = time()
5959
G = np.dot(X.T, X) # precomputed Gram matrix
6060
Xy = np.dot(X.T, y)
61-
lars_path(X, y, Xy=Xy, Gram=G, max_iter=n_informative)
61+
lars_path_gram(Xy=Xy, Gram=G, n_samples=y.size,
62+
max_iter=n_informative)
6263
delta = time() - tstart
6364
print("%0.3fs" % delta)
6465
lars_gram[i_f, i_s] = delta

0 commit comments

Comments
 (0)