Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
ci-sklearn16,
ci-sklearn17,
ci-sklearn18,
ci-sklearn19,
ci-sklearn-nightly
]

Expand Down
13,978 changes: 8,722 additions & 5,256 deletions pixi.lock

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,21 @@ python = "~=3.13.0"

[tool.pixi.feature.sklearn18.dependencies]
scikit-learn = "~=1.8.0"
fairlearn = "~=0.12.0"
fairlearn = "~=0.14.0"
pandas = "~=2.3.0"
numpy = "~=2.4.0"
scipy = "~=1.16.0"
# catboost = ">=1.0"
# TODO: catboost does not support python 3.14 - issue https://github.com/catboost/catboost/issues/2989
scipy = "~=1.17.0"
catboost = ">=1.0"
quantile-forest = "~=1.4.0"
python = "~=3.14.0"

[tool.pixi.feature.sklearn19.dependencies]
scikit-learn = "~=1.9.0"
fairlearn = "~=0.14.0"
pandas = "~=3.0.0"
numpy = "~=2.5.0"
scipy = "~=1.18.0"
catboost = ">=1.0"
quantile-forest = "~=1.4.0"
python = "~=3.14.0"

Expand All @@ -225,7 +234,7 @@ extra-index-urls = ["https://pypi.anaconda.org/scientific-python-nightly-wheels/

[tool.pixi.feature.sklearn-nightly.pypi-dependencies]
# The version value here needs to be exact, hence == instead of ~=
scikit-learn = "==1.9.dev0"
scikit-learn = "==1.10.dev0"
fairlearn = "*"
pandas = "*"
numpy = "*"
Expand All @@ -248,4 +257,5 @@ ci-sklearn15 = ["rich", "tests", "lint", "sklearn15"]
ci-sklearn16 = ["rich", "tests", "lint", "sklearn16"]
ci-sklearn17 = ["rich", "tests", "lint", "sklearn17"]
ci-sklearn18 = ["rich", "tests", "lint", "sklearn18"]
ci-sklearn19 = ["rich", "tests", "lint", "sklearn19"]
ci-sklearn-nightly = ["rich", "tests", "lint", "sklearn-nightly"]
2 changes: 1 addition & 1 deletion skops/card/_model_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ def add_permutation_importances(
ax,
x=permutation_importances.importances[sorted_importances_idx].T,
tick_labels=columns[sorted_importances_idx],
vert="horizontal",
orientation="horizontal",
)
ax.set_title(plot_name)
ax.set_xlabel("Decrease in Score")
Expand Down
2 changes: 1 addition & 1 deletion skops/card/tests/test_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ def test_copy_plots(self, destination_path, model_card):
model_card = model_card.add_plot(fig1=fig_1_path)

plt.plot([7, 6, 5, 4])
fig_2_path = "fig2.png"
fig_2_path = Path(plot_path) / "fig2.png"
plt.savefig(fig_2_path)
model_card = model_card.add_plot(fig2=fig_2_path)

Expand Down
12 changes: 7 additions & 5 deletions skops/io/tests/test_persist.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def _unsupported_estimators(type_filter=None):


@pytest.mark.parametrize(
"estimator", _tested_estimators(), ids=_get_check_estimator_ids
"estimator", list(_tested_estimators()), ids=_get_check_estimator_ids
)
def test_can_persist_non_fitted(estimator):
"""Check that non-fitted estimators can be persisted."""
Expand Down Expand Up @@ -394,7 +394,7 @@ def get_input(estimator):


@pytest.mark.parametrize(
"estimator", _tested_estimators(), ids=_get_check_estimator_ids
"estimator", list(_tested_estimators()), ids=_get_check_estimator_ids
)
def test_can_persist_fitted(estimator):
"""Check that fitted estimators can be persisted and return the right results."""
Expand Down Expand Up @@ -426,7 +426,9 @@ def test_can_persist_fitted(estimator):


@pytest.mark.parametrize(
"ufunc", _tested_ufuncs(), ids=SCIPY_UFUNC_TYPE_NAMES + NUMPY_UFUNC_TYPE_NAMES
"ufunc",
list(_tested_ufuncs()),
ids=SCIPY_UFUNC_TYPE_NAMES + NUMPY_UFUNC_TYPE_NAMES,
)
def test_can_trust_ufuncs(ufunc):
dumped = dumps(ufunc)
Expand All @@ -436,7 +438,7 @@ def test_can_trust_ufuncs(ufunc):

@pytest.mark.parametrize(
"type_",
_tested_types(),
list(_tested_types()),
ids=PRIMITIVE_TYPE_NAMES + NUMPY_DTYPE_TYPE_NAMES + CONTAINER_TYPE_NAMES,
)
def test_can_trust_types(type_):
Expand Down Expand Up @@ -552,7 +554,7 @@ def test_gradient_boosting_estimators_have_no_untrusted_types(estimator, problem


@pytest.mark.parametrize(
"estimator", _unsupported_estimators(), ids=_get_check_estimator_ids
"estimator", list(_unsupported_estimators()), ids=_get_check_estimator_ids
)
def test_unsupported_type_raises(estimator):
"""Estimators that are known to fail should raise an error"""
Expand Down
18 changes: 15 additions & 3 deletions skops/utils/_fixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,22 @@
from dataclasses import dataclass, field


def boxplot(ax, *, tick_labels, **kwargs):
"""A function to handle labels->tick_labels deprecation.
labels is deprecated in 3.9 and removed in 3.11.
def boxplot(ax, *, tick_labels, orientation="vertical", **kwargs):
"""A function to handle matplotlib deprecations across supported versions.

- ``labels`` -> ``tick_labels``: ``labels`` is deprecated in 3.9 and removed
in 3.11.
- ``vert`` (bool) -> ``orientation`` (str): ``orientation`` was added in 3.10
and ``vert`` was deprecated in 3.11 and removed in 3.13.
"""
from matplotlib import __version__ as mpl_version
from packaging.version import parse

if parse(mpl_version) >= parse("3.10"):
kwargs["orientation"] = orientation
else:
kwargs["vert"] = orientation == "vertical"

try:
return ax.boxplot(tick_labels=tick_labels, **kwargs)
except TypeError:
Expand Down
Loading