Skip to content

Commit

Permalink
Release 0.21.0 (#4894)
Browse files Browse the repository at this point in the history
Release PR for 0.21.0

* version number bump
* changelog
* minor typo fixes
  • Loading branch information
fkiraly committed Jul 20, 2023
1 parent b276d3b commit 22eb37b
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

> A unified interface for machine learning with time series
:rocket: **Version 0.20.1 out now!** [Check out the release notes here](https://www.sktime.net/en/latest/changelog.html).
:rocket: **Version 0.21.0 out now!** [Check out the release notes here](https://www.sktime.net/en/latest/changelog.html).

sktime is a library for time series analysis in Python. It provides a unified interface for multiple time series learning tasks. Currently, this includes time series classification, regression, clustering, annotation, and forecasting. It comes with [time series algorithms](https://www.sktime.net/en/stable/estimator_overview.html) and [scikit-learn] compatible tools to build, tune and validate time series models.

Expand Down
92 changes: 92 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,98 @@ All notable changes to this project will be documented in this file. We keep tra
For upcoming changes and next releases, see our `milestones <https://github.com/sktime/sktime/milestones?direction=asc&sort=due_date&state=open>`_.
For our long-term plan, see our :ref:`roadmap`.

Version 0.21.0 - 2023-07-19
---------------------------

Maintenance release - dependency updates, scheduled deprecations.

For last non-maintenance content updates, see 0.20.1.

Contents
~~~~~~~~

* ``sktime`` is now compatible with ``sklearn 1.3.X``
* start of change in column naming convention for univariate probabilistic forecasts,
in preparation for 0.23.0 - see below for details for users and developers
* scheduled 0.21.0 deprecation actions

Dependency changes
~~~~~~~~~~~~~~~~~~

* ``scikit-learn`` version bounds now allow versions ``1.3.X``
* the ``deprecated`` package is deprecated as a core dependency of ``sktime``, and
will cease to be a dependency from 0.22.0 onwards. No action is required of users
or developers, as the package was used only for internal deprecation actions.
* ``pycatch22`` has been added back as a soft dependency, after python 3.7 EOL

Deprecations and removals
~~~~~~~~~~~~~~~~~~~~~~~~~

Forecasting - change of column naming for univariate probabilistic forecasts
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

From 0.23.0, returns of forecasters' ``predict_quantiles`` and ``predict_intervals``
in the univariate case will be made consistent with the multivariate case:
the name of the uppermost (0-indexed) column level will always be the variable name.
Previously, in the univariate case, it was always ``Coverage`` or ``Quantiles``,
irrespective of the variable name present in ``y``, whereas in the multivariate case,
it was always the variable names present in ``y``.

The change will take place over two MINOR cycles, 0.21.X (early phase) and 0.22.X (late phase),
the union of which makes up the change period.
We explain the schedule below, for users, and then for maintainers of third party forecasters ("extenders").

Users should use a new, temporary ``legacy_interface`` argument to handle the change:

* Users - change period. The two forecaster methods ``predict_quantiles`` and ``predict_intervals``
will have a new boolean argument, ``legacy_interface``. If ``True``, the methods
produce returns with the current naming convention. If ``False``, the methods produce
returns with the future, post-change naming covention.
* Users - early and late phase. In the early phase (0.21.X), the default value of ``legacy_interface``
will be ``True``. In the late phase (0.22.X), the default value of ``legacy_interface`` will be ``False``.
This change of default will occur in 0.22.0, and may be breaking for users who do not specify the argument.
* Users - post-deprecation. In 0.23.0, the ``legacy_interface`` argument will be removed.
The methods will always produce returns with the future, post-change naming convention.
This change may be breaking for users who do not remove the argument by 0.23.0.
* Appropriate deprecation warnings will be raised from 0.21.0 onwards, until 0.22.last.
* Users - recommended change actions. Users should aim to upgrade dependent code to ``legacy_interface=False`` behaviour by 0.21.last,
and to remove ``legacy_interface`` arguments after 0.22.0 and before 0.23.0.
Users who need more time to upgrade dependent code can set ``legacy_interface=True`` until 0.22.last.

Extenders should use the new ``"pred_int:legacy_interface:testcfg"`` config field to upgrade their third party extensions:

* Extenders - change period. The config field ``"pred_int:legacy_interface:testcfg"`` has been added
to all descendants of the ``BaseForecaster`` class. This config controls the contract
that the ``check_estimator`` and ``pytest`` tests check against, and can be set by ``set_config``.
* The default value of the tag is ``"auto"`` - this means that the tests will check against the current
naming convention in the early phase (0.21.X), and against the future naming convention in the late phase (0.22.X),
for ``_predict_quantiles`` or ``_predict_intervals`` having the standard signature, without ``legacy_interface``.
From 0.23.0 on, the tag will have no effect.
* In the change period: if the tag is set to ``"new"``, the tests will always check against the new interface;
if the tag is set to ``"old"``, the tests will check against the old interface, irrespective of the phase.
From 0.23.0, the setting will have no effect and the tests will always check against the new interface.
* Extenders - recommended change actions: Extenders should aim to upgrade their third party extensions
to ``"pred_int:legacy_interface:testcfg=new"`` behaviour by 0.21.last. Tests against late stage
and post-deprecation behaviour can be enforced by setting ``forecaster.set_config({"pred_int:legacy_interface:testcfg": "new"})``,
before passing it to ``check_estimator``.
The ``set_config`` call can be removed after 0.22.0, and should be removed before 0.23.0, but will not be breaking if not removed.
* Extenders with a substantial user base of their own can, alternatively, implement and release ``_predict_quantiles`` and ``_predict_intervals``
with a ``legacy_interface`` argument before 0.22.0, the default of which should be ``False`` from the beginning on (even in early phase).
In this case, the ``"pred_int:legacy_interface:testcfg"`` tag should be set to ``"auto"``,
and the tests will check both new and old behaviour. The ``legacy_interface`` argument can be removed after 0.23.0.
This will result in the same transition experience for users of the extenders' forecasters as for users of ``sktime`` proper.


List of PR
~~~~~~~~~~

* [ENH] replace ``"Coverage"`` and ``"Quantiles"`` default variable name in univariate case with variable name (:pr:`4880`) :user:`fkiraly`, :user:`benheid`
* [BUG] 0.21.0 release bugfix - fix interaction of ``sklearn 1.3.0`` with dynamic error metic based on ``partial`` in ``test_make_scorer`` (:pr:`4915`) :user:`fkiraly`
* [MNT] xfail ``mlflow`` failure #4904 until debugged, gitignore for ``py-spy`` (:pr:`4913`) :user:`fkiraly`
* [DOC] 0.21.0 release action - update deprecation guide to reflect deprecation of use of `deprecated` (:pr:`4914`) :user:`fkiraly`
* [MNT] 0.21.0 release action - update ``sklearn`` bound to ``<1.4.0`` (:pr:`4778`) :user:`fkiraly`
* [MNT] 0.21.0 release action - add back ``pycatch22`` as a soft dependency post python 3.7 EOL (:pr:`4790`) :user:`fkiraly`

Version 0.20.1 - 2023-07-14
---------------------------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "sktime"
version = "0.20.1"
version = "0.21.0"
description = "A unified framework for machine learning with time series"
authors = [
{name = "sktime developers", email = "sktime.toolbox@gmail.com"},
Expand Down
2 changes: 1 addition & 1 deletion sktime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""sktime."""

__version__ = "0.20.1"
__version__ = "0.21.0"

__all__ = ["show_versions"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from sktime.utils.validation.panel import check_X


# TODO: fix this in 0.21.0
# TODO: fix this in 0.22.0
# base class should have been changed to BaseEarlyClassifier
class ProbabilityThresholdEarlyClassifier(BaseClassifier):
"""Probability Threshold Early Classifier.
Expand Down
2 changes: 1 addition & 1 deletion sktime/forecasting/base/_fh.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ def _to_relative(fh: ForecastingHorizon, cutoff=None) -> ForecastingHorizon:
absolute = _coerce_to_period(absolute, freq=fh.freq)
cutoff = _coerce_to_period(cutoff, freq=fh.freq)

# TODO: 0.21.0:
# TODO: 0.22.0:
# Check at every minor release whether lower pandas bound >=0.15.0
# if yes, can remove the workaround in the "else" condition and the check
#
Expand Down
2 changes: 1 addition & 1 deletion sktime/forecasting/compose/_bagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def _update(self, y, X=None, update_params=True):
self : reference to self
"""
# Need to construct a completely new y out of ol self._y and y and then
# fit_treansform the transformer and re-fit the foreaster.
# fit_treansform the transformer and re-fit the forecaster.
_y = update_data(self._y, y)

self.bootstrap_transformer_.fit(X=_y)
Expand Down
2 changes: 1 addition & 1 deletion sktime/forecasting/model_evaluation/_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def evaluate(
Optionally, users may select other metrics that can be supplied
by `scoring` argument. These can be forecast metrics of any kind,
i.e., point forecast metrics, interval metrics, quantile foreast metrics.
i.e., point forecast metrics, interval metrics, quantile forecast metrics.
https://www.sktime.net/en/stable/api_reference/performance_metrics.html?highlight=metrics
To evaluate estimators using a specific metric, provide them to the scoring arg.
>>> from sktime.performance_metrics.forecasting import MeanAbsoluteError
Expand Down

0 comments on commit 22eb37b

Please sign in to comment.