Skip to content

Commit 0eabe9b

Browse files
authored
Merge branch 'main' into mnt/fix-test-ui-crash
2 parents f1dd4fe + 1952984 commit 0eabe9b

File tree

10 files changed

+190
-121
lines changed

10 files changed

+190
-121
lines changed

.github/workflows/pypi_release.yml

Lines changed: 2 additions & 2 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@v6
51+
uses: actions/upload-artifact@v7
5252
with:
5353
name: wheels
5454
path: wheelhouse/*
@@ -102,7 +102,7 @@ jobs:
102102
id-token: write
103103

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

pytorch_forecasting/data/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
"""
2-
Datasets, etc. for timeseries data.
2+
Utilities for time series dataset construction and preprocessing.
33
4-
Handling timeseries data is not trivial. It requires special treatment.
5-
This sub-package provides the necessary tools to abstracts the necessary work.
4+
This subpackage provides dataset classes, normalization and encoding
5+
utilities, and batching tools required to transform raw time series data
6+
into model-ready PyTorch datasets.
67
"""
78

89
from pytorch_forecasting.data.encoders import (

pytorch_forecasting/layers/_embeddings/_data_embedding.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@
1414
class DataEmbedding_inverted(nn.Module):
1515
"""
1616
Data embedding module for time series data.
17-
Args:
18-
c_in (int): Number of input features.
19-
d_model (int): Dimension of the model.
20-
embed_type (str): Type of embedding to use. Defaults to "fixed".
21-
freq (str): Frequency of the time series data. Defaults to "h".
22-
dropout (float): Dropout rate. Defaults to 0.1.
17+
18+
Parameters
19+
----------
20+
c_in : int
21+
Number of input features.
22+
d_model : int
23+
Dimension of the model.
24+
embed_type : str
25+
Type of embedding to use. Defaults to "fixed".
26+
freq : str
27+
Frequency of the time series data. Defaults to "h".
28+
dropout : float
29+
Dropout rate. Defaults to 0.1.
2330
"""
2431

2532
def __init__(self, c_in, d_model, dropout=0.1):

pytorch_forecasting/layers/_embeddings/_en_embedding.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ class EnEmbedding(nn.Module):
1919
"""
2020
Encoder embedding module for time series data. Handles endogenous feature
2121
embeddings in this case.
22-
Args:
23-
n_vars (int): Number of input features.
24-
d_model (int): Dimension of the model.
25-
patch_len (int): Length of the patches.
26-
dropout (float): Dropout rate. Defaults to 0.1.
22+
23+
Parameters
24+
----------
25+
n_vars : int
26+
Number of input features.
27+
d_model : int
28+
Dimension of the model.
29+
patch_len : int
30+
Length of the patches.
31+
dropout : float
32+
Dropout rate. Defaults to 0.1.
2733
"""
2834

2935
def __init__(self, n_vars, d_model, patch_len, dropout):

pytorch_forecasting/layers/_embeddings/_positional_embedding.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
class PositionalEmbedding(nn.Module):
1515
"""
1616
Positional embedding module for time series data.
17-
Args:
18-
d_model (int): Dimension of the model.
19-
max_len (int): Maximum length of the input sequence. Defaults to 5000."""
17+
18+
Parameters
19+
----------
20+
d_model : int
21+
Dimension of the model.
22+
max_len : int
23+
Maximum length of the input sequence. Defaults to 5000.
24+
"""
2025

2126
def __init__(self, d_model, max_len=5000):
2227
super().__init__()

pytorch_forecasting/layers/_embeddings/_sub_nn.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def __init__(self, seq_len: int, lag: int, d_model: int, emb_dims: list, device)
1313
----------
1414
seq_len: int
1515
length of the sequence (sum of past and future steps)
16-
lag: (int):
16+
lag: int
1717
number of future step to be predicted
18-
hidden_size: int
18+
d_model: int
1919
dimension of all variables after they are embedded
2020
emb_dims: list
2121
size of the dictionary for embedding. One dimension for each categorical variable

pytorch_forecasting/layers/_filter/_moving_avg_filter.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@ class MovingAvg(nn.Module):
1111
"""
1212
Moving Average block for smoothing and trend extraction from time series data.
1313
14-
A moving average is a smoothing technique that creates a series of average from
14+
A moving average is a smoothing technique that creates a series of averages from
1515
different subsets of a time series.
1616
1717
For example: Given a time series ``x = [x_1, x_2, ..., x_n]``, the moving average
1818
with a kernel size of `k` calculates the average of each subset of `k` consecutive
1919
elements, resulting in a new series of averages.
2020
21-
Args:
22-
kernel_size (int):
23-
Size of the moving average kernel.
24-
stride (int):
25-
Stride for the moving average operation, typically set to 1.
21+
Parameters
22+
----------
23+
kernel_size : int
24+
Size of the moving average kernel.
25+
stride : int
26+
Stride for the moving average operation, typically set to 1.
2627
"""
2728

2829
def __init__(self, kernel_size, stride):

0 commit comments

Comments
 (0)