diff --git a/src/gluonts/torch/model/d_linear/module.py b/src/gluonts/torch/model/d_linear/module.py index c597517870..922885f36f 100644 --- a/src/gluonts/torch/model/d_linear/module.py +++ b/src/gluonts/torch/model/d_linear/module.py @@ -11,7 +11,7 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -from typing import Tuple +from typing import Optional, Tuple import torch from torch import nn @@ -87,7 +87,7 @@ def __init__( hidden_dimension: int, distr_output=StudentTOutput(), kernel_size: int = 25, - scaling: str = "mean", + scaling: Optional[str] = "mean", ) -> None: super().__init__() diff --git a/src/gluonts/torch/model/lag_tst/module.py b/src/gluonts/torch/model/lag_tst/module.py index cd03d25443..775615eac1 100644 --- a/src/gluonts/torch/model/lag_tst/module.py +++ b/src/gluonts/torch/model/lag_tst/module.py @@ -55,7 +55,7 @@ def __init__( activation: str, norm_first: bool, num_encoder_layers: int, - scaling: str, + scaling: Optional[str], lags_seq: Optional[List[int]] = None, distr_output=StudentTOutput(), ) -> None: diff --git a/src/gluonts/torch/model/patch_tst/module.py b/src/gluonts/torch/model/patch_tst/module.py index 5f5c3e9fbc..3e5ea1edce 100644 --- a/src/gluonts/torch/model/patch_tst/module.py +++ b/src/gluonts/torch/model/patch_tst/module.py @@ -108,7 +108,7 @@ def __init__( activation: str, norm_first: bool, num_encoder_layers: int, - scaling: str, + scaling: Optional[str], distr_output=StudentTOutput(), ) -> None: super().__init__() diff --git a/src/gluonts/torch/model/tide/module.py b/src/gluonts/torch/model/tide/module.py index e0eb06cb85..0e5911d50e 100644 --- a/src/gluonts/torch/model/tide/module.py +++ b/src/gluonts/torch/model/tide/module.py @@ -11,7 +11,7 @@ # express or implied. See the License for the specific language governing # permissions and limitations under the License. -from typing import List, Tuple +from typing import List, Optional, Tuple import torch from torch import nn @@ -243,7 +243,7 @@ def __init__( num_layers_decoder: int, layer_norm: bool, distr_output: Output, - scaling: str, + scaling: Optional[str], ) -> None: super().__init__()