Skip to content

Commit 465d47f

Browse files
committed
Merge branch 'main' into submodulev3
2 parents 0d0c449 + d391353 commit 465d47f

File tree

20 files changed

+311
-125
lines changed

20 files changed

+311
-125
lines changed

.github/workflows/assign.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ jobs:
1919
&& !github.event.issue.assignee
2020
steps:
2121
- run: |
22+
# Using REST API directly because assigning through gh has some severe limitations. For more details, see
23+
# https://github.com/scikit-learn/scikit-learn/issues/29395#issuecomment-2206776963
2224
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
23-
gh issue edit $ISSUE --add-assignee ${{ github.event.comment.user.login }}
25+
curl -H "Authorization: token $GH_TOKEN" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' \
26+
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
2427
gh issue edit $ISSUE --remove-label "help wanted"
2528
env:
2629
GH_TOKEN: ${{ github.token }}

.github/workflows/publish_pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
run: |
4040
python build_tools/github/check_wheels.py
4141
- name: Publish package to TestPyPI
42-
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
42+
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
4343
with:
4444
repository-url: https://test.pypi.org/legacy/
4545
print-hash: true
4646
if: ${{ github.event.inputs.pypi_repo == 'testpypi' }}
4747
- name: Publish package to PyPI
48-
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # v1.8.14
48+
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 # v1.9.0
4949
if: ${{ github.event.inputs.pypi_repo == 'pypi' }}
5050
with:
5151
print-hash: true

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# simple makefile to simplify repetitive build env management tasks under posix
22

33
PYTHON ?= python
4+
DEFAULT_MESON_BUILD_DIR = build/cp$(shell python -c 'import sys; print(f"{sys.version_info.major}{sys.version_info.minor}")' )
45

56
all:
67
@echo "Please use 'make <target>' where <target> is one of"
@@ -21,6 +22,11 @@ clean: clean-meson
2122

2223
clean-meson:
2324
pip uninstall -y scikit-learn
25+
# It seems in some cases removing the folder avoids weird compilation
26+
# errors (e.g. when switching from numpy>=2 to numpy<2). For some
27+
# reason ninja clean -C $(DEFAULT_MESON_BUILD_DIR) is not
28+
# enough
29+
rm -rf $(DEFAULT_MESON_BUILD_DIR)
2430

2531
dev-setuptools:
2632
$(PYTHON) setup.py build_ext -i

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
| ------------- | ------------------ |
7-
| 1.5.0 | :white_check_mark: |
8-
| < 1.5.0 | :x: |
7+
| 1.5.1 | :white_check_mark: |
8+
| < 1.5.1 | :x: |
99

1010
## Reporting a Vulnerability
1111

doc/about.rst

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ The project would like to thank the following funders.
176176

177177
.. div:: text-box
178178

179-
`:probabl. <https://probabl.ai>`_ funds Adrin Jalali, Arturo Amor, François Goupil,
180-
Guillaume Lemaitre, Jérémie du Boisberranger, Olivier Grisel, and Stefanie Senger.
179+
`:probabl. <https://probabl.ai>`_ employs Adrin Jalali, Arturo Amor,
180+
François Goupil, Guillaume Lemaitre, Jérémie du Boisberranger, Loïc Estève,
181+
Olivier Grisel, and Stefanie Senger.
181182

182183
.. div:: image-box
183184

@@ -198,9 +199,6 @@ The project would like to thank the following funders.
198199
.. |dataiku| image:: images/dataiku.png
199200
:target: https://www.dataiku.com/
200201

201-
.. |hf| image:: images/huggingface_logo-noborder.png
202-
:target: https://huggingface.co
203-
204202
.. |nvidia| image:: images/nvidia.png
205203
:target: https://www.nvidia.com
206204

@@ -245,7 +243,7 @@ The project would like to thank the following funders.
245243
+----------+-----------+
246244
| |axa| | |bnp| |
247245
+----------+-----------+
248-
| |nvidia| | |hf| |
246+
| |nvidia| |
249247
+----------+-----------+
250248
| |dataiku| |
251249
+----------+-----------+
@@ -501,6 +499,9 @@ the past:
501499
.. |aphp| image:: images/logo_APHP_text.png
502500
:target: https://aphp.fr/
503501

502+
.. |hf| image:: images/huggingface_logo-noborder.png
503+
:target: https://huggingface.co
504+
504505
.. raw:: html
505506

506507
<style>
@@ -538,26 +539,21 @@ the past:
538539

539540
|aphp|
540541

542+
.. grid-item::
543+
:class: sd-text-center
544+
:child-align: center
541545

542-
Sprints
543-
-------
544-
545-
- The International 2019 Paris sprint was kindly hosted by `AXA <https://www.axa.fr/>`_.
546-
Also some participants could attend thanks to the support of the `Alfred P.
547-
Sloan Foundation <https://sloan.org>`_, the `Python Software
548-
Foundation <https://www.python.org/psf/>`_ (PSF) and the `DATAIA Institute
549-
<https://dataia.eu/en>`_.
550-
551-
- The 2013 International Paris Sprint was made possible thanks to the support of
552-
`Télécom Paristech <https://www.telecom-paristech.fr/>`_, `tinyclues
553-
<https://www.tinyclues.com/>`_, the `French Python Association
554-
<https://www.afpy.org/>`_ and the `Fonds de la Recherche Scientifique
555-
<https://www.frs-fnrs.be>`_.
546+
|hf|
556547

557-
- The 2011 International Granada sprint was made possible thanks to the support
558-
of the `PSF <https://www.python.org/psf/>`_ and `tinyclues
559-
<https://www.tinyclues.com/>`_.
548+
Coding Sprints
549+
--------------
560550

551+
The scikit-learn project has a long history of `open source coding sprints
552+
<https://blog.scikit-learn.org/events/sprints-value/>`_ with over 50 sprint
553+
events from 2010 to present day. There are scores of sponsors who contributed
554+
to costs which include venue, food, travel, developer time and more. See
555+
`scikit-learn sprints <https://blog.scikit-learn.org/sprints/>`_ for a full
556+
list of events.
561557

562558
Donating to the project
563559
-----------------------

doc/datasets.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@ Dataset loading utilities
66

77
.. currentmodule:: sklearn.datasets
88

9-
The ``sklearn.datasets`` package embeds some small toy datasets
10-
as introduced in the :ref:`Getting Started <loading_example_dataset>` section.
11-
12-
This package also features helpers to fetch larger datasets commonly
13-
used by the machine learning community to benchmark algorithms on data
14-
that comes from the 'real world'.
9+
The ``sklearn.datasets`` package embeds some small toy datasets and provides helpers
10+
to fetch larger datasets commonly used by the machine learning community to benchmark
11+
algorithms on data that comes from the 'real world'.
1512

1613
To evaluate the impact of the scale of the dataset (``n_samples`` and
1714
``n_features``) while controlling the statistical properties of the data

doc/install.rst

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ Installing the latest release
3333
.. div:: install-instructions
3434

3535
.. tab-set::
36+
:class: tabs-os
3637

37-
.. tab-item:: pip
38-
:class-label: tab-6
39-
:sync: packager-pip
38+
.. tab-item:: Windows
39+
:class-label: tab-4
4040

4141
.. tab-set::
42+
:class: tabs-package-manager
4243

43-
.. tab-item:: Windows
44-
:class-label: tab-4
45-
:sync: os-windows
44+
.. tab-item:: pip
45+
:class-label: tab-6
46+
:sync: package-manager-pip
4647

4748
Install the 64-bit version of Python 3, for instance from the
4849
`official website <https://www.python.org/downloads/windows/>`__.
@@ -66,9 +67,21 @@ Installing the latest release
6667
python -m pip freeze # show all installed packages in the environment
6768
python -c "import sklearn; sklearn.show_versions()"
6869

69-
.. tab-item:: macOS
70-
:class-label: tab-4
71-
:sync: os-macos
70+
.. tab-item:: conda
71+
:class-label: tab-6
72+
:sync: package-manager-conda
73+
74+
.. include:: ./install_instructions_conda.rst
75+
76+
.. tab-item:: MacOS
77+
:class-label: tab-4
78+
79+
.. tab-set::
80+
:class: tabs-package-manager
81+
82+
.. tab-item:: pip
83+
:class-label: tab-6
84+
:sync: package-manager-pip
7285

7386
Install Python 3 using `homebrew <https://brew.sh/>`_ (`brew install python`)
7487
or by manually installing the package from the `official website
@@ -93,9 +106,21 @@ Installing the latest release
93106
python -m pip freeze # show all installed packages in the environment
94107
python -c "import sklearn; sklearn.show_versions()"
95108

96-
.. tab-item:: Linux
97-
:class-label: tab-4
98-
:sync: os-linux
109+
.. tab-item:: conda
110+
:class-label: tab-6
111+
:sync: package-manager-conda
112+
113+
.. include:: ./install_instructions_conda.rst
114+
115+
.. tab-item:: Linux
116+
:class-label: tab-4
117+
118+
.. tab-set::
119+
:class: tabs-package-manager
120+
121+
.. tab-item:: pip
122+
:class-label: tab-6
123+
:sync: package-manager-pip
99124

100125
Python 3 is usually installed by default on most Linux distributions. To
101126
check if you have it installed, try:
@@ -127,28 +152,12 @@ Installing the latest release
127152
python3 -m pip freeze # show all installed packages in the environment
128153
python3 -c "import sklearn; sklearn.show_versions()"
129154

130-
.. tab-item:: conda
131-
:class-label: tab-6
132-
:sync: packager-conda
133-
134-
Install conda using the `Anaconda or miniconda installers
135-
<https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`__
136-
or the `miniforge installers
137-
<https://github.com/conda-forge/miniforge#miniforge>`__ (no administrator
138-
permission required for any of those). Then run:
139-
140-
.. prompt:: bash
141-
142-
conda create -n sklearn-env -c conda-forge scikit-learn
143-
conda activate sklearn-env
144-
145-
In order to check your installation, you can use:
155+
.. tab-item:: conda
156+
:class-label: tab-6
157+
:sync: package-manager-conda
146158

147-
.. prompt:: bash
159+
.. include:: ./install_instructions_conda.rst
148160

149-
conda list scikit-learn # show scikit-learn version and location
150-
conda list # show all installed packages in the environment
151-
python -c "import sklearn; sklearn.show_versions()"
152161

153162
Using an isolated environment such as pip venv or conda makes it possible to
154163
install a specific version of scikit-learn with pip or conda and its dependencies

doc/install_instructions_conda.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Install conda using the `Anaconda or miniconda installers
2+
<https://docs.conda.io/projects/conda/en/latest/user-guide/install/>`__ or the
3+
`miniforge installers <https://github.com/conda-forge/miniforge#miniforge>`__ (no
4+
administrator permission required for any of those). Then run:
5+
6+
.. prompt:: bash
7+
8+
conda create -n sklearn-env -c conda-forge scikit-learn
9+
conda activate sklearn-env
10+
11+
In order to check your installation, you can use:
12+
13+
.. prompt:: bash
14+
15+
conda list scikit-learn # show scikit-learn version and location
16+
conda list # show all installed packages in the environment
17+
python -c "import sklearn; sklearn.show_versions()"

doc/metadata_routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ Meta-estimators and functions supporting metadata routing:
305305
- :func:`sklearn.model_selection.cross_val_score`
306306
- :func:`sklearn.model_selection.cross_val_predict`
307307
- :class:`sklearn.model_selection.learning_curve`
308+
- :class:`sklearn.model_selection.validation_curve`
308309
- :class:`sklearn.multiclass.OneVsOneClassifier`
309310
- :class:`sklearn.multiclass.OneVsRestClassifier`
310311
- :class:`sklearn.multiclass.OutputCodeClassifier`
@@ -323,5 +324,4 @@ Meta-estimators and tools not supporting metadata routing yet:
323324
- :class:`sklearn.feature_selection.RFECV`
324325
- :class:`sklearn.feature_selection.SequentialFeatureSelector`
325326
- :class:`sklearn.model_selection.permutation_test_score`
326-
- :class:`sklearn.model_selection.validation_curve`
327327
- :class:`sklearn.semi_supervised.SelfTrainingClassifier`

doc/scss/install.scss

Lines changed: 47 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,55 @@
66
* https://sass-lang.com/guide/
77
*/
88

9-
.install-instructions .sd-tab-set > label.sd-tab-label {
10-
margin: 0;
11-
text-align: center;
9+
.install-instructions .sd-tab-set {
10+
.sd-tab-content {
11+
padding: 0.5rem 0 0 0; // Vertical gap between the two sets of nested tabs
12+
background-color: transparent;
13+
border: none;
1214

13-
&.tab-6 {
14-
width: 50% !important;
15+
p:first-child {
16+
margin-top: 1rem !important;
17+
}
1518
}
1619

17-
&.tab-4 {
18-
width: calc(100% / 3) !important;
20+
> label.sd-tab-label {
21+
margin: 0 3px; // Horizontal gap within the same set of tabs
22+
display: flex;
23+
align-items: center;
24+
justify-content: center;
25+
border-radius: 5px !important;
26+
27+
&.tab-6 {
28+
width: calc((100% - var(--tab-caption-width, 0%)) / 2 - 6px) !important;
29+
}
30+
31+
&.tab-4 {
32+
width: calc((100% - var(--tab-caption-width, 0%)) / 3 - 6px) !important;
33+
}
34+
}
35+
36+
> input:checked + label.sd-tab-label {
37+
transform: unset;
38+
border: 2px solid var(--pst-color-primary);
39+
}
40+
41+
// Show tab captions on large screens
42+
@media screen and (min-width: 960px) {
43+
--tab-caption-width: 20%;
44+
45+
&::before {
46+
width: var(--tab-caption-width);
47+
display: flex;
48+
align-items: center;
49+
font-weight: bold;
50+
}
51+
52+
&.tabs-os::before {
53+
content: "Operating System";
54+
}
55+
56+
&.tabs-package-manager::before {
57+
content: "Package Manager";
58+
}
1959
}
2060
}

doc/templates/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ <h4 class="sk-landing-call-header">Who uses scikit-learn?</h4>
298298
<img src="_static/bnp-small.png" title="BNP Paris Bas Cardif">
299299
<img src="_static/microsoft-small.png" title="Microsoft">
300300
<img src="_static/dataiku-small.png" title="Dataiku">
301-
<img src="_static/huggingface_logo-noborder.png" title="Hugging Face">
302301
<img src="_static/nvidia-small.png" title="Nvidia">
303302
<img src="_static/quansight-labs-small.png" title="Quansight Labs">
304303
</div>

doc/whats_new/v1.5.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ Changelog
4848
instead of implicitly converting those inputs as regular NumPy arrays.
4949
:pr:`29119` by :user:`Olivier Grisel`.
5050

51-
- |Fix| Fix a regression in :func:`metrics.accuracy_score` and in :func:`metrics.zero_one_loss`
52-
causing an error for Array API dispatch with multilabel inputs.
53-
:pr:`29269` by :user:`Yaroslav Korobko <Tialo>` and :pr:`29336` by :user:`Edoardo Abati <EdAbati>`.
51+
- |Fix| Fix a regression in :func:`metrics.accuracy_score` and in
52+
:func:`metrics.zero_one_loss` causing an error for Array API dispatch with multilabel
53+
inputs.
54+
:pr:`29269` by :user:`Yaroslav Korobko <Tialo>` and
55+
:pr:`29336` by :user:`Edoardo Abati <EdAbati>`.
5456

5557
:mod:`sklearn.model_selection`
5658
..............................
@@ -72,7 +74,7 @@ Changelog
7274

7375
- |Fix| Fix an issue in :func:`tree.export_graphviz` and :func:`tree.plot_tree`
7476
that could potentially result in exception or wrong results on 32bit OSes.
75-
:pr:`` by :user:`Loïc Estève<lesteve>`.
77+
:pr:`29327` by :user:`Loïc Estève<lesteve>`.
7678

7779
:mod:`sklearn.utils`
7880
....................

0 commit comments

Comments
 (0)