Skip to content

Commit

Permalink
Release 0.30.0 (#2419)
Browse files Browse the repository at this point in the history
* bump u8darts 0.29.0 to 0.30.0

* update changelog
  • Loading branch information
dennisbader authored Jun 19, 2024
1 parent b07fb2f commit ad150e9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
58 changes: 34 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,34 @@ but cannot always guarantee backwards compatibility. Changes that may **break co

## [Unreleased](https://github.com/unit8co/darts/tree/master)

[Full Changelog](https://github.com/unit8co/darts/compare/0.29.0...master)
[Full Changelog](https://github.com/unit8co/darts/compare/0.30.0...master)

### For users of the library:
**Improved**
- 🚀🚀 Improvements to `GlobalForecastingModel` (regression-, ensemble-, and neural network models) : [#2404](https://github.com/unit8co/darts/pull/2404), [#2410](https://github.com/unit8co/darts/pull/2410) and [#2417](https://github.com/unit8co/darts/pull/2417) by [Anton Ragot](https://github.com/AntonRagot) and [Dennis Bader](https://github.com/dennisbader).
- Added parameters `sample_weight` and `val_sample_weight` to `fit()`, `historical_forecasts()`, `backtest()`, `residuals`, and `gridsearch()` to apply weights to each observation, label (each step in the output chunk), and target component in the training and evaluation set. Supported by both deterministic and probabilistic models. The sample weight can either be `TimeSeries` themselves or built-in weight generators "linear" and "exponential" decay. In case of a `TimeSeries` it is handled identically as the covariates (e.g. pass multiple weight series with multiple target series, relevant time frame extraction is handled automatically for you, ...).
- Improvements to the Anomaly Detection Module through major refactor. The refactor includes major performance optimization for the majority of the processes and improvements to the API, consistency, reliability, and the documentation. Some of these necessary changes come at the cost of breaking changes : [#1477](https://github.com/unit8co/darts/pull/1477) by [Dennis Bader](https://github.com/dennisbader), [Samuele Giuliano Piazzetta](https://github.com/piaz97), [Antoine Madrona](https://github.com/madtoinou), [Julien Herzen](https://github.com/hrzn), [Julien Adda](https://github.com/julien12234).
- 🚀🚀 Added an example notebook that showcases how to use Darts for Time Series Anomaly Detection
- Added a new dataset for anomaly detection with the number of taxi passengers in New York from the year 2014 to 2015.
- `FittableWindowScorer` (KMeans, PyOD, and Wasserstein Scorers) now accept any of darts "per-time" step metrics as difference function `diff_fn`.
- `ForecastingAnomalyModel` is now much faster thanks to optimized historical forecasts to generate the prediction input for the scorers. We also added more control over the historical forecasts generation through additional parameters in all model methods.

**Fixed**

**Dependencies**

### For developers of the library:

## [0.30.0](https://github.com/unit8co/darts/tree/0.30.0) (2024-06-19)
### For users of the library:
**Improved**
- 🚀🚀 All `GlobalForecastingModel` now support being trained with sample weights (regression-, ensemble-, and neural network models) : [#2404](https://github.com/unit8co/darts/pull/2404), [#2410](https://github.com/unit8co/darts/pull/2410), [#2417](https://github.com/unit8co/darts/pull/2417) and [#2418](https://github.com/unit8co/darts/pull/2418) by [Anton Ragot](https://github.com/AntonRagot) and [Dennis Bader](https://github.com/dennisbader).
- Added parameters `sample_weight` and `val_sample_weight` to `fit()`, `historical_forecasts()`, `backtest()`, `residuals`, and `gridsearch()` to apply weights to each observation, label (each step in the output chunk), and target component in the training and evaluation set. Supported by both deterministic and probabilistic models. The sample weight can either be `TimeSeries` themselves or built-in weight generators "linear" and "exponential" decay. In case of a `TimeSeries` it is handled identically as the covariates (e.g. pass multiple weight series with multiple target series, relevant time frame extraction is handled automatically for you, ...). You can find an example [here](https://unit8co.github.io/darts/quickstart/00-quickstart.html#Sample-Weights).
- 🚀🚀 Improvements to the Anomaly Detection Module through major refactor. The refactor includes major performance optimization for the majority of processes and improvements to the API, consistency, reliability, and the documentation. Some of these necessary changes come at the cost of breaking changes : [#1477](https://github.com/unit8co/darts/pull/1477) by [Dennis Bader](https://github.com/dennisbader), [Samuele Giuliano Piazzetta](https://github.com/piaz97), [Antoine Madrona](https://github.com/madtoinou), [Julien Herzen](https://github.com/hrzn), [Julien Adda](https://github.com/julien12234).
- Added an [example notebook](https://unit8co.github.io/darts/examples/22-anomaly-detection-examples.html) that showcases how to use Darts for Time Series Anomaly Detection.
- Added a new dataset `TaxiNewYorkDataset` for anomaly detection with the number of taxi passengers in New York from the years 2014 and 2015.
- `FittableWindowScorer` (KMeans, PyOD, and Wasserstein Scorers) now accept any of darts ["per-time" step metrics](https://unit8co.github.io/darts/generated_api/darts.metrics.html) as difference function `diff_fn`.
- `ForecastingAnomalyModel` is now much faster in generating forecasts (input for the scorers) thanks to optimized historical forecasts. We also added more control over the historical forecasts generation through additional parameters in all model methods.
- 🔴 Breaking changes:
- `FittableWindowScorer` (KMeans, PyOD, and Wasserstein Scorers) now expects `diff_fn` to be one of Darts "per-time" step metrics
- `ForecastingAnomalyModel` : `model` is now enforced to be a `GlobalForecastingModel`
- `*.eval_accuracy()`: (Aggregators, Detectors, Filtering/Forecasting Anomaly Models, Scorers)
- renamed method to `eval_metric()`:
- `*.eval_accuracy()` : (Aggregators, Detectors, Filtering/Forecasting Anomaly Models, Scorers)
- renamed method to `eval_metric()` :
- renamed params `actual_anomalies` to `anomalies`, and `anomaly_score` to `pred_scores`
- `*.show_anomalies()`: (Filtering/Forecasting Anomaly Models, Scorers)
- `*.show_anomalies()` : (Filtering/Forecasting Anomaly Models, Scorers)
- renamed params `actual_anomalies` to `anomalies`
- `*.fit()` (Filtering/Forecasting Anomaly Models)
- renamed params `actual_anomalies` to `anomalies`
Expand All @@ -35,36 +45,36 @@ but cannot always guarantee backwards compatibility. Changes that may **break co
- `darts.ad.utils.eval_accuracy_from_binary_prediction` :
- renamed function to `eval_metric_from_binary_prediction`
- renamed params `actual_anoamlies` to `anomalies`, and `binary_pred_anomalies` to `pred_anomalies`
- `darts.ad.utils.show_anomalies_from_scores`:
- `darts.ad.utils.show_anomalies_from_scores` :
- renamed params `series` to `actual_series`, `actual_anomalies` to `anomalies`, `model_output` to `pred_series`, and `anomaly_scores` to `pred_scores`
- Improvements to `TorchForecastingModel` : [#2295](https://github.com/unit8co/darts/pull/2295) by [Bohdan Bilonoh](https://github.com/BohdanBilonoh).
- Added `dataloader_kwargs` parameters to `fit*()`, `predict*()`, and `find_lr()` for more control over the PyTorch `DataLoader` setup.
- 🔴 Removed parameter `num_loader_workers` from `fit*()`, `predict*()`, `find_lr()`. You can now set the parameter through the `dataloader_kwargs` dict.
- Improvements to `DataTransformers` :
- Significant speed up when using `fit`, `fit_transform`, `transform`, and `inverse_transform` on a large number of series. The component masking logic was moved into the parallelized transform methods. [#2401](https://github.com/unit8co/darts/pull/2401) by [Dennis Bader](https://github.com/dennisbader).
- Improvements to `TimeSeries` : [#1477](https://github.com/unit8co/darts/pull/1477) by [Dennis Bader](https://github.com/dennisbader).
- New method `with_times_and_values()`, which returns a new series with a new time index and new values but with identical columns and metadata as the series called from (static covariates, hierarchy).
- New method `slice_intersect_times()`, which returns the sliced time index of a series, where the index has been intersected with another series.
- Method `with_values()` now also acts on array-like `values` rather than only on numpy arrays.
- Improvements to `TorchForecastingModel`: [#2295](https://github.com/unit8co/darts/pull/2295) by [Bohdan Bilonoh](https://github.com/BohdanBilonoh).
- Added `dataloader_kwargs` parameters to `fit*()`, `predict*()`, and `find_lr()` for more control over the PyTorch `DataLoader` setup.
- 🔴 Removed parameter `num_loader_workers` from `fit*()`, `predict*()`, `find_lr()`. You can now set the parameter through the `dataloader_kwargs` dict.
- Improvements to `DataTransformers`:
- Significant speed up when using `fit`, `fit_transform`, `transform`, and `inverse_transform` with a large number of series. The component masking logic was moved into the parallelized transform methods. [#2401](https://github.com/unit8co/darts/pull/2401) by [Dennis Bader](https://github.com/dennisbader).
- Improvements to quick start notebook : [#2418](https://github.com/unit8co/darts/pull/2418) by [Dennis Bader](https://github.com/dennisbader).
- Added examples for using sample weights, forecast start shifting, direct likelihood parameter predictions.
- Enhanced examples for historical forecasts, backtest and residuals.

**Fixed**
- Fixed a bug when using a `RegressionModel` (that supports validation series) with a validation set, and encoders and/or component-specific lags, where the encodings and component specific lags were not added to the set. [#2383](https://github.com/unit8co/darts/pull/2383) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug where `n_steps_between` did not work properly with custom business frequencies. This affected metrics computation. [#2357](https://github.com/unit8co/darts/pull/2357) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug when calling `predict()` with a `MixedCovariatesTorchModel` (e.g. TiDE, N/DLinear, ...) `n<output_chunk_length` and a list of series with length `len(series) < n`, where the predictions did not return the correct number of series. [#2374](https://github.com/unit8co/darts/pull/2374) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug when using a `RegressionModel` (that supports validation series) with a validation set: encoders, static covariates, and component-specific lags are now correctly applied to the validation set. [#2383](https://github.com/unit8co/darts/pull/2383) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug where `darts.utils.utils.n_steps_between()` did not work properly with custom business frequencies. This affected metrics computation. [#2357](https://github.com/unit8co/darts/pull/2357) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug when calling `predict()` with a `MixedCovariatesTorchModel` (e.g. TiDE, N/DLinear, ...), `n<output_chunk_length` and a list of series with length `len(series) < n`, where the predictions did not return the correct number of series. [#2374](https://github.com/unit8co/darts/pull/2374) by [Dennis Bader](https://github.com/dennisbader).
- Fixed a bug when using a `TorchForecastingModel` with stateful torch metrics, where the metrics were incorrectly computed as non-stateful. [#2391](https://github.com/unit8co/darts/pull/2391) by [Tim Rosenflanz](https://github.com/tRosenflanz)

**Dependencies**
- We set an upper version cap on `numpy<2.0.0` until all dependencies have migrated. [#2413](https://github.com/unit8co/darts/pull/2413) by [Dennis Bader](https://github.com/dennisbader).

### For developers of the library:
**Dependencies**
- Improvements to linting via updated pre-commit configurations: [#2324](https://github.com/unit8co/darts/pull/2324) by [Jirka Borovec](https://github.com/borda).
- Improvements to unified linting by switch `isort` to Ruff's rule I. [#2339](https://github.com/unit8co/darts/pull/2339) by [Jirka Borovec](https://github.com/borda)
- Improvements to unified linting by switch `pyupgrade` to Ruff's rule UP. [#2340](https://github.com/unit8co/darts/pull/2340) by [Jirka Borovec](https://github.com/borda)
- Improvements to CI, running lint locally via pre-commit instead of particular tools. [#2327](https://github.com/unit8co/darts/pull/2327) by [Jirka Borovec](https://github.com/borda)
- We set an upper version cap on `numpy<2.0.0` until all dependencies have migrated. [#2413](https://github.com/unit8co/darts/pull/2413) by [Dennis Bader](https://github.com/dennisbader).


### For developers of the library:

## [0.29.0](https://github.com/unit8co/darts/tree/0.29.0) (2024-04-17)
### For users of the library:
Expand Down
2 changes: 1 addition & 1 deletion setup_u8darts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def read_requirements(path):

setup(
name="u8darts",
version="0.29.0",
version="0.30.0",
description="A python library for easy manipulation and forecasting of time series.",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit ad150e9

Please sign in to comment.