Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
f8c0116
Removing deprecated features
rcap107 Aug 22, 2025
42a9de6
_
rcap107 Aug 22, 2025
cfcb916
_
rcap107 Aug 22, 2025
26a8564
_
rcap107 Aug 22, 2025
7c0bd20
minor changes
rcap107 Aug 28, 2025
038d6d4
Merge remote-tracking branch 'upstream/main' into remove-deprecated-o…
rcap107 Sep 9, 2025
a26775c
changelog
rcap107 Sep 9, 2025
ca9a7a1
fixing failing tests
rcap107 Sep 9, 2025
7802167
Merge remote-tracking branch 'upstream/main' into remove-deprecated-o…
rcap107 Sep 17, 2025
7fd69de
fixing test
rcap107 Sep 17, 2025
9632ad7
updating changelog
rcap107 Sep 17, 2025
80762c0
Merge branch 'main' into pr/rcap107/1567
rcap107 Oct 28, 2025
d7d738a
fixing doctest
rcap107 Oct 28, 2025
11386af
Merge remote-tracking branch 'upstream/main' into pr/rcap107/1567
rcap107 Nov 24, 2025
38fdeb4
Adding a fixture to avoid race conditions in CI
rcap107 Nov 24, 2025
5fe9919
removing redundant set_config
rcap107 Nov 24, 2025
9cde596
Merge branch 'main' into pr/rcap107/1567
rcap107 Dec 1, 2025
674604a
removing ken embeddings
rcap107 Dec 1, 2025
b75294b
removing references to ken
rcap107 Dec 1, 2025
86dcb5f
adding a test for verbosity
rcap107 Dec 1, 2025
2ddabf9
updating changelog
rcap107 Dec 1, 2025
2ea3688
un-deprecating patch_display and unpatch_display
rcap107 Dec 8, 2025
d08119d
Merge branch 'main' into pr/rcap107/1567
rcap107 Dec 8, 2025
40282fd
addressing comments
rcap107 Dec 9, 2025
53411a6
Merge remote-tracking branch 'upstream/HEAD' into pr/rcap107/1567
rcap107 Dec 9, 2025
6f6f0aa
removing duplicated fixture
rcap107 Dec 9, 2025
1218f28
Update skrub/conftest.py
rcap107 Dec 9, 2025
917c353
rewording comment
rcap107 Dec 10, 2025
05c9fff
Merge branch 'remove-deprecated-objects' of github.com:rcap107/skrub …
rcap107 Dec 10, 2025
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
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ Changes
:pr:`1628` by :user:`Jérôme Dockès <jeromedockes>`.
- The parameter ``splitter`` of :meth:`DataOp.skb.train_test_split` has been
renamed ``split_func``. :pr:`1630` by :user:`Jérôme Dockès <jeromedockes>`.

- KEN embeddings and all the relevant functions have been removed from skrub.
:pr:`1567` by :user:`Riccardo Cappuzzo<rcap107>`.
- The objects ``tabular_learner`` and ``DropIfTooManyNulls`` were removed. Use
:func:`tabular_pipeline` and :class:`DropUninformative` instead.
:pr:`1567` by :user:`Riccardo Cappuzzo<rcap107>`.
- The skrub global configuration now includes a parameter for setting the default
verbosity of the :class:`TableReport`.
:pr:`1567` by :user:`Riccardo Cappuzzo<rcap107>`.

Bugfixes
--------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ are available by using
>>> import skrub
>>> config = skrub.get_config()
>>> config.keys()
dict_keys(['use_table_report', 'use_table_report_data_ops', 'max_plot_columns', 'max_association_columns', 'subsampling_seed', 'enable_subsampling', 'float_precision', 'cardinality_threshold'])
dict_keys(['use_table_report', 'use_table_report_data_ops', 'table_report_verbosity', 'max_plot_columns', 'max_association_columns', 'subsampling_seed', 'enable_subsampling', 'float_precision', 'cardinality_threshold'])

These are the parameters currently available in the global configuration:

Expand Down
7 changes: 3 additions & 4 deletions skrub/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
from ._squashing_scaler import SquashingScaler
from ._string_encoder import StringEncoder
from ._table_vectorizer import Cleaner, TableVectorizer
from ._tabular_pipeline import tabular_learner, tabular_pipeline
from ._tabular_pipeline import tabular_pipeline
from ._text_encoder import TextEncoder
from ._to_categorical import ToCategorical
from ._to_datetime import ToDatetime, to_datetime
Expand All @@ -64,10 +64,7 @@
"deferred",
"eval_mode",
"TableReport",
"patch_display",
"unpatch_display",
"tabular_pipeline",
"tabular_learner",
"DatetimeEncoder",
"ToDatetime",
"Joiner",
Expand Down Expand Up @@ -100,6 +97,8 @@
"StringEncoder",
"column_associations",
"SquashingScaler",
"patch_display",
"unpatch_display",
"get_config",
"set_config",
"config_context",
Expand Down
26 changes: 26 additions & 0 deletions skrub/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def _parse_env_bool(env_variable_name, default):
_global_config = {
"use_table_report": _parse_env_bool("SKB_USE_TABLE_REPORT", False),
"use_table_report_data_ops": _parse_env_bool("SKB_USE_TABLE_REPORT_DATA_OPS", True),
"table_report_verbosity": int(os.environ.get("SKB_TABLE_REPORT_VERBOSITY", 1)),
"max_plot_columns": int(os.environ.get("SKB_MAX_PLOT_COLUMNS", 30)),
"max_association_columns": int(os.environ.get("SKB_MAX_ASSOCIATION_COLUMNS", 30)),
"subsampling_seed": int(os.environ.get("SKB_SUBSAMPLING_SEED", 0)),
Expand Down Expand Up @@ -74,6 +75,7 @@ def _apply_external_patches(config):
_patching._patch_display(
max_plot_columns=config["max_plot_columns"],
max_association_columns=config["max_plot_columns"],
verbose=config["table_report_verbosity"],
)
else:
# No-op if dispatch haven't been previously enabled
Expand All @@ -83,6 +85,7 @@ def _apply_external_patches(config):
def set_config(
use_table_report=None,
use_table_report_data_ops=None,
table_report_verbosity=None,
max_plot_columns=None,
max_association_columns=None,
subsampling_seed=None,
Expand Down Expand Up @@ -116,6 +119,11 @@ def set_config(
This configuration can also be set with the ``SKB_USE_TABLE_REPORT_DATA_OPS``
environment variable.

table_report_verbosity : int, default=None
Set the level of verbosity of the :class:`~skrub.TableReport`.
Default is 1 (print the progress bar). Refer to the ``TableReport``
documentation for more details.

max_plot_columns : int, default=None
Set the ``max_plot_columns`` argument of :class:`~skrub.TableReport`.
Default is 30. If "all", all columns will be plotted.
Expand Down Expand Up @@ -191,6 +199,17 @@ def set_config(
)
local_config["use_table_report_data_ops"] = use_table_report_data_ops

if table_report_verbosity is not None:
if (
not isinstance(table_report_verbosity, numbers.Integral)
or table_report_verbosity < 0
):
raise ValueError(
"'table_report_verbosity' must be a non-negative integer, got"
f" {table_report_verbosity!r}"
)
local_config["table_report_verbosity"] = table_report_verbosity

if max_plot_columns is not None:
if not isinstance(max_plot_columns, numbers.Real) and max_plot_columns != "all":
raise ValueError(
Expand Down Expand Up @@ -247,6 +266,7 @@ def config_context(
*,
use_table_report=None,
use_table_report_data_ops=None,
table_report_verbosity=None,
max_plot_columns=None,
max_association_columns=None,
subsampling_seed=None,
Expand Down Expand Up @@ -280,6 +300,11 @@ def config_context(
This configuration can also be set with the ``SKB_USE_TABLE_REPORT_DATA_OPS``
environment variable.

table_report_verbosity : int, default=None
Set the level of verbosity of the :class:`~skrub.TableReport`.
Default is 0 (no verbosity). Refer to the ``TableReport`` documentation for
more details.

max_plot_columns : int, default=None
Set the ``max_plot_columns`` argument of :class:`~skrub.TableReport`.
Default is 30. If "all", all columns will be plotted.
Expand Down Expand Up @@ -348,6 +373,7 @@ def config_context(
set_config(
use_table_report=use_table_report,
use_table_report_data_ops=use_table_report_data_ops,
table_report_verbosity=table_report_verbosity,
max_plot_columns=max_plot_columns,
max_association_columns=max_association_columns,
subsampling_seed=subsampling_seed,
Expand Down
98 changes: 0 additions & 98 deletions skrub/_drop_if_too_many_nulls.py

This file was deleted.

23 changes: 0 additions & 23 deletions skrub/_reporting/_patching.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import importlib
import warnings
Comment thread
jeromedockes marked this conversation as resolved.

from ._table_report import TableReport

Expand Down Expand Up @@ -66,10 +65,6 @@ def patch_display(
):
"""Replace the default DataFrame HTML displays with ``skrub.TableReport``.

.. deprecated:: 0.6.0
The functionality provided by this function is now implemented in
:func:`~skrub.set_config`.

This function replaces the HTML displays (what is shown when an object is
the output of a jupyter notebook cell) of pandas and polars DataFrames
with a TableReport.
Expand Down Expand Up @@ -112,13 +107,6 @@ def patch_display(
max_plot_columns=max_plot_columns,
max_association_columns=max_association_columns,
)
warnings.warn(
(
"patch_display will be deprecated in the next release. "
"Equivalent functionality is available in skrub.set_config."
),
category=FutureWarning,
)


def _patch_display(
Expand All @@ -136,10 +124,6 @@ def _patch_display(
def unpatch_display(pandas=True, polars=True):
"""Undo the effect of ``skrub.patch_display()``.

.. deprecated:: 0.6.0
The functionality provided by this function is now implemented in
:func:`~skrub.set_config`.

This function restores the default HTML displays of pandas and polars
DataFrames.

Expand All @@ -159,13 +143,6 @@ def unpatch_display(pandas=True, polars=True):
Directly create a report from a dataframe.
"""
_change_display(_unpatch, _get_to_patch(pandas=pandas, polars=polars))
warnings.warn(
(
"unpatch_display will be deprecated in the next release. "
"Equivalent functionality is available in skrub.set_config."
),
category=FutureWarning,
)


def _unpatch_display(pandas=True, polars=True):
Expand Down
9 changes: 6 additions & 3 deletions skrub/_reporting/_table_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(
order_by=None,
title=None,
column_filters=None,
verbose=1,
verbose=None,
max_plot_columns=None,
max_association_columns=None,
open_tab="table",
Expand All @@ -214,6 +214,10 @@ def __init__(
)

n_rows = max(1, n_rows)
if verbose is None:
self.verbose = _config.get_config()["table_report_verbosity"]
else:
self.verbose = verbose

# Validate open_tab parameter
valid_tabs = ["table", "stats", "distributions", "associations"]
Expand All @@ -227,12 +231,11 @@ def __init__(
"order_by": order_by,
"max_top_slice_size": -(n_rows // -2),
"max_bottom_slice_size": n_rows // 2,
"verbose": verbose,
"verbose": self.verbose,
}
self._to_html_kwargs = {}
self.title = title
self.column_filters = column_filters
self.verbose = verbose
self.max_plot_columns, self.max_association_columns = _check_max_cols(
max_plot_columns, max_association_columns
)
Expand Down
Loading