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
4 changes: 2 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
python -m pytest -s -v -m "inference" skops/

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v3
with:
env_vars: OS,PYTHON
fail_ci_if_error: true
Expand All @@ -101,4 +101,4 @@ jobs:
# the coverage is uploaded with or without a token. This only helps with some
# codecov errors. It's a recommended action from here:
# https://github.com/codecov/codecov-action/issues/837#issuecomment-1453877750
token: 79395387-e193-4b18-b2ee-74a3b8dce269
token: 2b8d4d69-6de6-4e1d-840a-5ccf9d849565
8 changes: 4 additions & 4 deletions skops/card/_model_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,19 @@

from skops.card._templates import CONTENT_PLACEHOLDER, SKOPS_TEMPLATE, Templates
from skops.io import load
from skops.utils._fixes import boxplot
from skops.utils.importutils import import_or_raise

if sys.version_info >= (3, 11):
from typing import Self
else:
from typing_extensions import Self


# Repr attributes can be used to control the behavior of repr
aRepr = Repr()
aRepr.maxother = 79
aRepr.maxstring = 79


VALID_TEMPLATES = {item.value for item in Templates}
NEED_SECTION_ERR_MSG = (
"You are trying to {action} but you're using a custom template, please pass the "
Expand Down Expand Up @@ -1225,9 +1224,10 @@ def add_permutation_importances(
)
sorted_importances_idx = permutation_importances.importances_mean.argsort()
_, ax = plt.subplots()
ax.boxplot(
boxplot(
ax,
x=permutation_importances.importances[sorted_importances_idx].T,
labels=columns[sorted_importances_idx],
tick_labels=columns[sorted_importances_idx],
vert=False,
)
ax.set_title(plot_name)
Expand Down
2 changes: 1 addition & 1 deletion skops/hub_utils/tests/common.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This is the token for the skops user on the hub, used for the CI.
HF_HUB_TOKEN = "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"
HF_HUB_TOKEN = "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"
8 changes: 8 additions & 0 deletions skops/utils/_fixes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
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.
"""
try:
return ax.boxplot(tick_labels=tick_labels, **kwargs)
except TypeError:
return ax.boxplot(labels=tick_labels, **kwargs)