Skip to content

Commit 06fdd58

Browse files
authored
Merge branch 'main' into iTransformer
2 parents 4fbaeea + a5e806a commit 06fdd58

38 files changed

+3281
-1491
lines changed

.github/workflows/pypi_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
python -m build --wheel --sdist --outdir wheelhouse
4949
5050
- name: Store wheels
51-
uses: actions/upload-artifact@v5
51+
uses: actions/upload-artifact@v6
5252
with:
5353
name: wheels
5454
path: wheelhouse/*
@@ -61,7 +61,7 @@ jobs:
6161
fail-fast: false
6262
matrix:
6363
os: [ubuntu-latest, macos-latest, windows-latest]
64-
python-version: ["3.10", "3.11", "3.12", "3.13"]
64+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
6565

6666
steps:
6767
- uses: actions/checkout@v6
@@ -102,7 +102,7 @@ jobs:
102102
id-token: write
103103

104104
steps:
105-
- uses: actions/download-artifact@v6
105+
- uses: actions/download-artifact@v7
106106
with:
107107
name: wheels
108108
path: wheelhouse

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
fail-fast: false
8383
matrix:
8484
os: [ubuntu-latest, macos-latest, windows-latest]
85-
python-version: ["3.10", "3.11", "3.12", "3.13"]
85+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
8686

8787
steps:
8888
- uses: actions/checkout@v6
@@ -122,7 +122,7 @@ jobs:
122122
fail-fast: false
123123
matrix:
124124
os: [ubuntu-latest, macos-latest, windows-latest]
125-
python-version: ["3.10", "3.11", "3.12", "3.13"]
125+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
126126

127127
steps:
128128
- uses: actions/checkout@v6

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).

build_tools/changelog.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if os.getenv("GITHUB_TOKEN") is not None:
1111
HEADERS["Authorization"] = f"token {os.getenv('GITHUB_TOKEN')}"
1212

13-
OWNER = "jdb78"
13+
OWNER = "sktime"
1414
REPO = "pytorch-forecasting"
1515
GITHUB_REPOS = "https://api.github.com/repos"
1616

@@ -118,7 +118,7 @@ def render_contributors(prs: list, fmt: str = "rst"):
118118
"""Find unique authors and print a list in given format."""
119119
authors = sorted({pr["user"]["login"] for pr in prs}, key=lambda x: x.lower())
120120

121-
header = "Contributors"
121+
header = "All Contributors"
122122
if fmt == "github":
123123
print(f"### {header}")
124124
print(", ".join(f"@{user}" for user in authors))
@@ -152,9 +152,9 @@ def render_row(pr):
152152
"""Render a single row with PR in restructuredText format."""
153153
print(
154154
"*",
155-
pr["title"].replace("`", "``"),
156-
f"(:pr:`{pr['number']}`)",
157-
f":user:`{pr['user']['login']}`",
155+
pr["title"],
156+
f"(#{pr['number']})",
157+
f"@{pr['user']['login']}",
158158
)
159159

160160

@@ -166,8 +166,7 @@ def render_changelog(prs, assigned):
166166
for title, _ in assigned.items():
167167
pr_group = [prs[i] for i in assigned[title]]
168168
if pr_group:
169-
print(f"\n{title}")
170-
print("~" * len(title), end="\n\n")
169+
print(f"\n### {title}\n")
171170

172171
for pr in sorted(pr_group, key=lambda x: parser.parse(x["merged_at"])):
173172
render_row(pr)
@@ -187,7 +186,7 @@ def render_changelog(prs, assigned):
187186
assigned = assign_prs(pulls, categories)
188187
render_changelog(pulls, assigned)
189188
print()
190-
render_contributors(pulls)
189+
render_contributors(pulls, fmt="github")
191190

192191
release = fetch_latest_release()
193192
diff = github_compare_tags(release["tag_name"])

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Installation
33

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

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

99
Installing pytorch-forecasting

docs/source/tutorials/ar.ipynb

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,16 @@
187187
" max_prediction_length=prediction_length,\n",
188188
")\n",
189189
"\n",
190-
"validation = TimeSeriesDataSet.from_dataset(training, data, min_prediction_idx=training_cutoff + 1)\n",
190+
"validation = TimeSeriesDataSet.from_dataset(\n",
191+
" training, data, min_prediction_idx=training_cutoff + 1\n",
192+
")\n",
191193
"batch_size = 128\n",
192-
"train_dataloader = training.to_dataloader(train=True, batch_size=batch_size, num_workers=0)\n",
193-
"val_dataloader = validation.to_dataloader(train=False, batch_size=batch_size, num_workers=0)"
194+
"train_dataloader = training.to_dataloader(\n",
195+
" train=True, batch_size=batch_size, num_workers=0\n",
196+
")\n",
197+
"val_dataloader = validation.to_dataloader(\n",
198+
" train=False, batch_size=batch_size, num_workers=0\n",
199+
")"
194200
]
195201
},
196202
{
@@ -251,7 +257,7 @@
251257
},
252258
{
253259
"cell_type": "code",
254-
"execution_count": 6,
260+
"execution_count": null,
255261
"metadata": {},
256262
"outputs": [
257263
{
@@ -269,12 +275,18 @@
269275
"source": [
270276
"pl.seed_everything(42)\n",
271277
"trainer = pl.Trainer(accelerator=\"auto\", gradient_clip_val=0.1)\n",
272-
"net = NBeats.from_dataset(training, learning_rate=3e-2, weight_decay=1e-2, widths=[32, 512], backcast_loss_ratio=0.1)"
278+
"net = NBeats.from_dataset(\n",
279+
" training,\n",
280+
" learning_rate=3e-2,\n",
281+
" weight_decay=1e-2,\n",
282+
" widths=[32, 512],\n",
283+
" backcast_loss_ratio=0.1,\n",
284+
")"
273285
]
274286
},
275287
{
276288
"cell_type": "code",
277-
"execution_count": 7,
289+
"execution_count": null,
278290
"metadata": {},
279291
"outputs": [
280292
{
@@ -321,9 +333,14 @@
321333
],
322334
"source": [
323335
"# find optimal learning rate\n",
324-
"from lightning.pytorch.tuner import Tuner\n",
336+
"from pytorch_forecasting.tuning import Tuner\n",
325337
"\n",
326-
"res = Tuner(trainer).lr_find(net, train_dataloaders=train_dataloader, val_dataloaders=val_dataloader, min_lr=1e-5)\n",
338+
"res = Tuner(trainer).lr_find(\n",
339+
" net,\n",
340+
" train_dataloaders=train_dataloader,\n",
341+
" val_dataloaders=val_dataloader,\n",
342+
" min_lr=1e-5,\n",
343+
")\n",
327344
"print(f\"suggested learning rate: {res.suggestion()}\")\n",
328345
"fig = res.plot(show=True, suggest=True)\n",
329346
"fig.show()\n",
@@ -340,7 +357,7 @@
340357
},
341358
{
342359
"cell_type": "code",
343-
"execution_count": 14,
360+
"execution_count": null,
344361
"metadata": {},
345362
"outputs": [
346363
{
@@ -443,7 +460,9 @@
443460
}
444461
],
445462
"source": [
446-
"early_stop_callback = EarlyStopping(monitor=\"val_loss\", min_delta=1e-4, patience=10, verbose=False, mode=\"min\")\n",
463+
"early_stop_callback = EarlyStopping(\n",
464+
" monitor=\"val_loss\", min_delta=1e-4, patience=10, verbose=False, mode=\"min\"\n",
465+
")\n",
447466
"trainer = pl.Trainer(\n",
448467
" max_epochs=3,\n",
449468
" accelerator=\"auto\",\n",
@@ -481,7 +500,7 @@
481500
},
482501
{
483502
"cell_type": "code",
484-
"execution_count": 15,
503+
"execution_count": null,
485504
"metadata": {},
486505
"outputs": [],
487506
"source": [
@@ -645,7 +664,9 @@
645664
],
646665
"source": [
647666
"for idx in range(10): # plot 10 examples\n",
648-
" best_model.plot_prediction(raw_predictions.x, raw_predictions.output, idx=idx, add_loss_to_title=True)"
667+
" best_model.plot_prediction(\n",
668+
" raw_predictions.x, raw_predictions.output, idx=idx, add_loss_to_title=True\n",
669+
" )"
649670
]
650671
},
651672
{

docs/source/tutorials/deepar.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
},
302302
{
303303
"cell_type": "code",
304-
"execution_count": 8,
304+
"execution_count": null,
305305
"metadata": {},
306306
"outputs": [
307307
{
@@ -348,7 +348,7 @@
348348
],
349349
"source": [
350350
"# find optimal learning rate\n",
351-
"from lightning.pytorch.tuner import Tuner\n",
351+
"from pytorch_forecasting.tuning import Tuner\n",
352352
"\n",
353353
"res = Tuner(trainer).lr_find(\n",
354354
" net,\n",
@@ -883,7 +883,7 @@
883883
},
884884
{
885885
"cell_type": "code",
886-
"execution_count": 10,
886+
"execution_count": null,
887887
"metadata": {},
888888
"outputs": [],
889889
"source": [
@@ -1268,7 +1268,7 @@
12681268
],
12691269
"metadata": {
12701270
"kernelspec": {
1271-
"display_name": ".venv",
1271+
"display_name": ".venv (3.12.3)",
12721272
"language": "python",
12731273
"name": "python3"
12741274
},
@@ -1282,7 +1282,7 @@
12821282
"name": "python",
12831283
"nbconvert_exporter": "python",
12841284
"pygments_lexer": "ipython3",
1285-
"version": "3.10.9"
1285+
"version": "3.12.3"
12861286
}
12871287
},
12881288
"nbformat": 4,

docs/source/tutorials/nhits.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@
306306
},
307307
{
308308
"cell_type": "code",
309-
"execution_count": 7,
309+
"execution_count": null,
310310
"metadata": {},
311311
"outputs": [
312312
{
@@ -353,7 +353,7 @@
353353
],
354354
"source": [
355355
"# find optimal learning rate\n",
356-
"from lightning.pytorch.tuner import Tuner\n",
356+
"from pytorch_forecasting.tuning import Tuner\n",
357357
"\n",
358358
"res = Tuner(trainer).lr_find(\n",
359359
" net,\n",
@@ -553,7 +553,7 @@
553553
},
554554
{
555555
"cell_type": "code",
556-
"execution_count": 9,
556+
"execution_count": null,
557557
"metadata": {},
558558
"outputs": [],
559559
"source": [

0 commit comments

Comments
 (0)