Skip to content

Commit 76e040a

Browse files
committed
Merge branch 'main' into skbase-dep
2 parents 794e713 + 15dcbf0 commit 76e040a

File tree

111 files changed

+7825
-2612
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+7825
-2612
lines changed

.github/workflows/pypi_release.yml

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,40 @@ on:
55
types: [published]
66

77
jobs:
8+
check_tag:
9+
name: Check tag
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v6
14+
15+
- uses: actions/setup-python@v6
16+
with:
17+
python-version: '3.11'
18+
19+
- shell: bash
20+
run: |
21+
TAG="${{ github.event.release.tag_name }}"
22+
GH_TAG_NAME="${TAG#v}"
23+
PY_VERSION=$(python - <<'PY'
24+
import pathlib, tomllib
25+
data = tomllib.loads(pathlib.Path("pyproject.toml").read_text(encoding="utf-8"))
26+
print(data.get("project").get("version"))
27+
PY
28+
)
29+
if [ "${GH_TAG_NAME}" != "${PY_VERSION}" ]; then
30+
echo "::error::Tag (${GH_TAG_NAME}) does not match pyproject.toml version (${PY_VERSION})."
31+
exit 2
32+
fi
33+
834
build_wheels:
935
name: Build wheels
1036
runs-on: ubuntu-latest
1137

1238
steps:
13-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v6
1440

15-
- uses: actions/setup-python@v5
41+
- uses: actions/setup-python@v6
1642
with:
1743
python-version: '3.11'
1844

@@ -22,7 +48,7 @@ jobs:
2248
python -m build --wheel --sdist --outdir wheelhouse
2349
2450
- name: Store wheels
25-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@v6
2652
with:
2753
name: wheels
2854
path: wheelhouse/*
@@ -35,13 +61,13 @@ jobs:
3561
fail-fast: false
3662
matrix:
3763
os: [ubuntu-latest, macos-latest, windows-latest]
38-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
64+
python-version: ["3.10", "3.11", "3.12", "3.13"]
3965

4066
steps:
41-
- uses: actions/checkout@v4
67+
- uses: actions/checkout@v6
4268

4369
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v5
70+
uses: actions/setup-python@v6
4571
with:
4672
python-version: ${{ matrix.python-version }}
4773

@@ -76,7 +102,7 @@ jobs:
76102
id-token: write
77103

78104
steps:
79-
- uses: actions/download-artifact@v5
105+
- uses: actions/download-artifact@v7
80106
with:
81107
name: wheels
82108
path: wheelhouse

.github/workflows/test.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: repository checkout step
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323

2424
- name: python environment step
25-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@v6
2626
with:
2727
python-version: "3.11"
2828

2929
- name: install pre-commit
3030
run: python3 -m pip install pre-commit
3131

3232
- name: Checkout code
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v6
3434
with:
3535
fetch-depth: 0
3636

@@ -57,11 +57,11 @@ jobs:
5757
needs: code-quality
5858
runs-on: ubuntu-latest
5959
steps:
60-
- uses: actions/checkout@v4
60+
- uses: actions/checkout@v6
6161
- name: Set up Python
62-
uses: actions/setup-python@v5
62+
uses: actions/setup-python@v6
6363
with:
64-
python-version: 3.9
64+
python-version: "3.11"
6565
- name: Install dependencies
6666
run: |
6767
python -m pip install --upgrade pip
@@ -82,13 +82,13 @@ jobs:
8282
fail-fast: false
8383
matrix:
8484
os: [ubuntu-latest, macos-latest, windows-latest]
85-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
85+
python-version: ["3.10", "3.11", "3.12", "3.13"]
8686

8787
steps:
88-
- uses: actions/checkout@v4
88+
- uses: actions/checkout@v6
8989

9090
- name: Set up Python ${{ matrix.python-version }}
91-
uses: actions/setup-python@v5
91+
uses: actions/setup-python@v6
9292
with:
9393
python-version: ${{ matrix.python-version }}
9494

@@ -122,13 +122,13 @@ jobs:
122122
fail-fast: false
123123
matrix:
124124
os: [ubuntu-latest, macos-latest, windows-latest]
125-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
125+
python-version: ["3.10", "3.11", "3.12", "3.13"]
126126

127127
steps:
128-
- uses: actions/checkout@v4
128+
- uses: actions/checkout@v6
129129

130130
- name: Set up Python ${{ matrix.python-version }}
131-
uses: actions/setup-python@v5
131+
uses: actions/setup-python@v6
132132
with:
133133
python-version: ${{ matrix.python-version }}
134134

CHANGELOG.md

Lines changed: 95 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,95 @@
11
# Release Notes
22

3+
## v1.5.0
4+
Release focusing on:
5+
6+
* python 3.9 end-of-life
7+
* changes to testing framework.
8+
* New estimators in `pytorch-forecasting` *v1* and *beta v2*.
9+
10+
### Highlights
11+
#### `pytorch-forecasting` ***v1.5.0***
12+
* Kolmogorov Arnold Block for `NBeats` by @Sohaib-Ahmed21 in https://github.com/sktime/pytorch-forecasting/pull/1751
13+
* `xLSTMTime` implementation by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1709
14+
15+
#### `pytorch-forecasting` ***Beta v2***
16+
* Implementing D2 data module, tests and `TimeXer` model from `tslib` for PTF v2 by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1836
17+
* Add `DLinear` model from `tslib` for PTF v2 by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1874
18+
* Add `Samformer` model for PTF v2 from DSIPTS by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1952
19+
* `Tide` model in PTF v2 interface from `dsipts` by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1889
20+
21+
### Enhancements
22+
* [ENH] Test framework for `ptf-v2` by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1841
23+
* [ENH] Implementing D2 data module, tests and `TimeXer` model from `tslib` for v2 by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1836
24+
* [ENH] `DLinear` model from `tslib` by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1874
25+
* [ENH] Enable `DeprecationWarning` , `PendingDeprecationWarning` and `FutureWarning` when running pytest by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1912
26+
* [ENH] Suppress `__array_wrap__` warning in `numpy 2` for `torch` and `pandas` by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1911
27+
* [ENH] Suppress PyTorch deprecation warning: UserWarning: `nn.init.constant` is now deprecated in favor of `nn.init.constant_` by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1915
28+
* [ENH] two-way linkage of model package classes and neural network classes by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1888
29+
* [ENH] Add a copy of `BaseFixtureGenerator` to `pytorch-forecasting/tests/_base` as a true base class by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1919
30+
* [ENH] Remove references to model from the `BaseFixtureGenerator` by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1923
31+
* [ENH] Improve test framework for v1 models by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1908
32+
* [ENH] `xLSTMTime` implementation by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1709
33+
* [ENH] Improve test framework for v1 metrics by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1907
34+
* [ENH] `Tide` model in `v2` interface by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1889
35+
* [ENH] docstring test suite for functions by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1955
36+
* [ENH] Add missing test for forward output of `TimeXer` as proposed in #1936 by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1951
37+
* [ENH] Add `Samformer` model for PTF v2 from DSIPTS by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1952
38+
* [ENH] Kolmogorov Arnold Block for NBeats by @Sohaib-Ahmed21 in https://github.com/sktime/pytorch-forecasting/pull/1751
39+
* [ENH] Standardize output format for `tslib` v2 models by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1965
40+
* [ENH] Add `Metrics` support to `ptf-v2` by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1960
41+
* [ENH] `check_estimator` utility for checking new estimators against unified API contract by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1954
42+
* [ENH] Standardize testing of estimator outputs and skip tests for non-conformant estimators by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1971
43+
44+
### Fixes
45+
* [BUG] Fix issue with `EncodeNormalizer(method='standard', center=False)` for scale value by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1902
46+
* [BUG] fixed memory leak in `TimeSeriesDataset` by using `@cached_property` and clean-up of index construction by @Vishnu-Rangiah in https://github.com/sktime/pytorch-forecasting/pull/1905
47+
* [BUG] Fix issue with `plot_prediction_actual_by_variable` unsupported operand type(s) for *: 'numpy.ndarray' and 'Tensor' by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1903
48+
* [BUG] Correctly set lagged variables to known when lag >= horizon by @hubkrieb in https://github.com/sktime/pytorch-forecasting/pull/1910
49+
* [BUG] Updated base_model.py to account for importing error by @Himanshu-Verma-ds in https://github.com/sktime/pytorch-forecasting/pull/1488
50+
* [BUG][DOC] Fix documentation: pass loss argument to BaseModel in custom models tutorial example by @PranavBhatP in https://github.com/sktime/pytorch-forecasting/pull/1931
51+
* [BUG] fix broken version inspection if package distribution has `None` name by @lohraspco in https://github.com/sktime/pytorch-forecasting/pull/1926
52+
* [BUG] fix sporadic `tkinter` failures in CI by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1937
53+
* [BUG] Device inconsistency in `MQF2DistributionLoss` raising: RuntimeError: Expected all tensors to be on the same device by @fnhirwa in https://github.com/sktime/pytorch-forecasting/pull/1916
54+
* [BUG] fixed memory leak in BaseModel by detach some tensor by @zju-ys in https://github.com/sktime/pytorch-forecasting/pull/1924
55+
* [BUG] Fix `TimeSeriesDataSet` wrong inferred `tensor` `dtype` when `time_idx` is included in features by @cngmid in https://github.com/sktime/pytorch-forecasting/pull/1950
56+
* [BUG] standardize output format of xLSTMTime estimator for point predictions by @sanskarmodi8 in https://github.com/sktime/pytorch-forecasting/pull/1978
57+
* [BUG] Standardize output format of NBeats and NBeatsKAN estimators by @sanskarmodi8 in https://github.com/sktime/pytorch-forecasting/pull/1977
58+
59+
### Documentation
60+
* [DOC] Correct documentation for N-BEATS by @Pinaka07 in https://github.com/sktime/pytorch-forecasting/pull/1914
61+
* [DOC] 1.1.0 changelog - missing entries by @jdb78 in https://github.com/sktime/pytorch-forecasting/pull/1512
62+
* [DOC] fix minor typo in changelog by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1917
63+
* [DOC] Missing parenthesis in docstring of MASE by @caph1993 in https://github.com/sktime/pytorch-forecasting/pull/1944
64+
65+
### Maintenance
66+
* [MNT] remove import conditionals for `python 3.6` by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1928
67+
* [MNT] [Dependabot](deps): bump actions/download-artifact from 4 to 5 by @dependabot[bot] in https://github.com/sktime/pytorch-forecasting/pull/1939
68+
* [MNT] [Dependabot](deps): Bump actions/checkout from 4 to 5 by @dependabot[bot] in https://github.com/sktime/pytorch-forecasting/pull/1942
69+
* [MNT] Check versions in wheels workflow by @szepeviktor in https://github.com/sktime/pytorch-forecasting/pull/1948
70+
* [MNT] [Dependabot](deps): Bump actions/setup-python from 5 to 6 by @dependabot[bot] in https://github.com/sktime/pytorch-forecasting/pull/1963
71+
* [MNT] Update CODEOWNERS with current core dev state by @fkiraly in https://github.com/sktime/pytorch-forecasting/pull/1972
72+
* [MNT] python 3.9 end-of-life by @phoeenniixx in https://github.com/sktime/pytorch-forecasting/pull/1980
73+
74+
### All Contributors
75+
@agobbifbk,
76+
@caph1993,
77+
@cngmid,
78+
@fkiraly,
79+
@fnhirwa,
80+
@Himanshu-Verma-ds,
81+
@hubkrieb,
82+
@jdb78,
83+
@lohraspco,
84+
@phoeenniixx,
85+
@Pinaka07,
86+
@PranavBhatP,
87+
@sanskarmodi8,
88+
@Sohaib-Ahmed21,
89+
@szepeviktor
90+
@Vishnu-Rangiah,
91+
@zju-ys
92+
393
## v1.4.0
494

595
Feature and maintenance update.
@@ -291,7 +381,7 @@ Maintenance update widening compatibility ranges and consolidating dependencies:
291381

292382
### Changed
293383

294-
- Dropping Python 3.6 suppport, adding 3.10 support (#479)
384+
- Dropping Python 3.6 support, adding 3.10 support (#479)
295385
- Refactored dataloader sampling - moved samplers to pytorch_forecasting.data.samplers module (#479)
296386
- Changed transformation format for Encoders to dict from tuple (#949)
297387

@@ -318,7 +408,7 @@ Maintenance update widening compatibility ranges and consolidating dependencies:
318408
- Allow using [torchmetrics](https://torchmetrics.readthedocs.io/) as loss metrics (#776)
319409
- Enable fitting `EncoderNormalizer()` with limited data history using `max_length` argument (#782)
320410
- More flexible `MultiEmbedding()` with convenience `output_size` and `input_size` properties (#829)
321-
- Fix concatentation of attention (#902)
411+
- Fix concatenation of attention (#902)
322412

323413
### Fixed
324414

@@ -340,7 +430,7 @@ Maintenance update widening compatibility ranges and consolidating dependencies:
340430
### Fixed
341431

342432
- Fix inattention mutation to `x_cont` (#732).
343-
- Compatability with pytorch-lightning 1.5 (#758)
433+
- Compatibility with pytorch-lightning 1.5 (#758)
344434

345435
### Contributors
346436

@@ -427,7 +517,7 @@ Maintenance update widening compatibility ranges and consolidating dependencies:
427517

428518
### Added
429519

430-
- Adding a filter functionality to the timeseries datasset (#329)
520+
- Adding a filter functionality to the timeseries dataset (#329)
431521
- Add simple models such as LSTM, GRU and a MLP on the decoder (#380)
432522
- Allow usage of any torch optimizer such as SGD (#380)
433523

@@ -496,7 +586,7 @@ Maintenance update widening compatibility ranges and consolidating dependencies:
496586
### Added
497587

498588
- Adding support for multiple targets in the TimeSeriesDataSet (#199) and amended tutorials.
499-
- Temporal fusion transformer and DeepAR with support for multiple tagets (#199)
589+
- Temporal fusion transformer and DeepAR with support for multiple targets (#199)
500590
- Check for non-finite values in TimeSeriesDataSet and better validate scaler argument (#220)
501591
- LSTM and GRU implementations that can handle zero-length sequences (#235)
502592
- Helpers for implementing auto-regressive models (#236)

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# The file specifies framework level core developers for automated review requests
22

3-
* @benheid @fkiraly @fnhirwa @geetu040 @jdb78 @pranavvp16 @XinyuWuu @yarnabrina
3+
* @benheid @fkiraly @fnhirwa @jdb78 @phoeenniixx @pranavbhatp @yarnabrina

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Code of Conduct
2+
3+
All contributors, maintainers, and participants are expected to follow the
4+
`sktime` Code of Conduct found on our [website](https://www.sktime.net/en/latest/get_involved/code_of_conduct.html).

GOVERNANCE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Governance
2+
3+
`pytorch-forecasting` is governed by the `sktime` community.
4+
5+
You can find our governance guidelines on our [website](https://www.sktime.net/en/latest/get_involved/governance.html).

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ To implement new models or other custom components, see the [How to implement ne
7575

7676
# Usage example
7777

78-
Networks can be trained with the [PyTorch Lighning Trainer](https://pytorch-lightning.readthedocs.io/en/latest/common/trainer.html) on [pandas Dataframes](https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#dataframe) which are first converted to a [TimeSeriesDataSet](https://pytorch-forecasting.readthedocs.io/en/latest/data.html).
78+
Networks can be trained with the [PyTorch Lightning Trainer](https://pytorch-lightning.readthedocs.io/en/latest/common/trainer.html) on [pandas Dataframes](https://pandas.pydata.org/pandas-docs/stable/user_guide/dsintro.html#dataframe) which are first converted to a [TimeSeriesDataSet](https://pytorch-forecasting.readthedocs.io/en/latest/data.html).
7979

8080
```python
8181
# imports for training
@@ -122,7 +122,7 @@ batch_size = 128
122122
train_dataloader = training.to_dataloader(train=True, batch_size=batch_size, num_workers=2)
123123
val_dataloader = validation.to_dataloader(train=False, batch_size=batch_size, num_workers=2)
124124

125-
# create PyTorch Lighning Trainer with early stopping
125+
# create PyTorch Lightning Trainer with early stopping
126126
early_stop_callback = EarlyStopping(monitor="val_loss", min_delta=1e-4, patience=1, verbose=False, mode="min")
127127
lr_logger = LearningRateMonitor()
128128
trainer = pl.Trainer(

docs/source/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Creating datasets
2727
200 for the decoder length. Consider that longer lengths increase the time it takes
2828
for your model to train.
2929

30-
The ratio of decoder and encoder length depends on the used alogrithm.
30+
The ratio of decoder and encoder length depends on the used algorithm.
3131
Look at :ref:`documentation <models>` to get clues.
3232

3333
* **It takes very long to create the dataset. Why is that?**
@@ -61,7 +61,7 @@ Training models
6161

6262
* **Why does the learning rate finder not finish?**
6363

64-
First, ensure that the trainer does not have the keword ``fast_dev_run=True`` and
64+
First, ensure that the trainer does not have the keyword ``fast_dev_run=True`` and
6565
``limit_train_batches=...`` set. Second, use a target normalizer in your training dataset.
6666
Third, increase the ``early_stop_threshold`` argument
6767
of the ``lr_find`` method to a large number.

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ To use the MQF2 loss (multivariate quantile loss), also execute
5252
5353
pip install pytorch-forecasting[mqf2]
5454
55-
Vist :ref:`Getting started <getting-started>` to learn more about the package and detailled installation instruction.
55+
Visit :ref:`Getting started <getting-started>` to learn more about the package and detailed installation instruction.
5656
The :ref:`Tutorials <tutorials>` section provides guidance on how to use models and implement new ones.
5757

5858
.. toctree::

docs/source/installation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installation
33

44
``pytorch-forecasting`` currently supports:
55

6-
* Python versions 3.8, 3.9, 3.10, 3.11, and 3.12.
6+
* Python versions 3.10, 3.11, 3.12 and 3.13.
77
* Operating systems : Linux, macOS, and Windows
88

99
Installing pytorch-forecasting
@@ -81,7 +81,7 @@ Contributing to ``pytorch-forecasting``
8181
Contributions to PyTorch Forecasting are very welcome! You do not have to be an expert in deep learning
8282
to contribute. If you find a bug - fix it! If you miss a feature - propose it!
8383

84-
To obtain an editible version ``pytorch-forecasting`` for development or contributions,
84+
To obtain an editable version ``pytorch-forecasting`` for development or contributions,
8585
you will need to set up:
8686

8787
* a local clone of the ``pytorch-forecasting`` repository.
@@ -128,7 +128,7 @@ Creating a fork and cloning the repository
128128
> upstream https://github.com/sktime/pytorch-forecasting.git (fetch)
129129
> upstream https://github.com/sktime/pytorch-forecasting.git (push)
130130
131-
Setting up an editible virtual environment
131+
Setting up an editable virtual environment
132132
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133133

134134
1. Set up a new virtual environment. Our instructions will go through the commands to set up a ``conda`` environment which is recommended for ``pytorch-forecasting`` development.
@@ -183,13 +183,13 @@ Technical Design Principles
183183
~~~~~~~~~~~~~~~~~~~~~~~~~~~
184184

185185
When writing code for your new feature, it is recommended to follow these
186-
technical design principles to ensure compatability between the feature and the library.
186+
technical design principles to ensure compatibility between the feature and the library.
187187

188188
* Backward compatible API if possible to prevent breaking code.
189189
* Powerful abstractions to enable quick experimentation. At the same time, the abstractions should
190190
allow the user to still take full control.
191191
* Intuitive default values that do not need changing in most cases.
192-
* Focus on forecasting time-related data - specificially timeseries regression and classificiation.
192+
* Focus on forecasting time-related data - specifically timeseries regression and classification.
193193
Contributions not directly related to this topic might not be merged. We want to keep the library as
194194
crisp as possible.
195195
* Install ``pre-commit`` and have it run on every commit that you make on your feature branches.

0 commit comments

Comments
 (0)