diff --git a/src/gluonts/torch/model/mq_cnn/estimator.py b/src/gluonts/torch/model/mq_cnn/estimator.py index b0d779a151..1dfdf87d75 100644 --- a/src/gluonts/torch/model/mq_cnn/estimator.py +++ b/src/gluonts/torch/model/mq_cnn/estimator.py @@ -456,7 +456,8 @@ def __init__( self.feat_static_real_dim = 0 def create_transformation(self) -> Chain: - """Creates transformation to be applied to input dataset + """ + Creates transformation to be applied to input dataset. Returns: Chain: @@ -577,7 +578,8 @@ def create_transformation(self) -> Chain: return Chain(transforms) def _create_instance_splitter(self, mode: str) -> Chain: - """Creates instance splitter to be applied to the dataset + """ + Creates instance splitter to be applied to the dataset. Args: mode (str): `training`, `validation` or `test` @@ -676,7 +678,8 @@ def create_training_data_loader( shuffle_buffer_length: Optional[int] = None, **kwargs, ) -> Iterable: - """Creates data loader for the training dataset + """ + Creates data loader for the training dataset. Args: data (Dataset): training dataset @@ -706,7 +709,8 @@ def create_validation_data_loader( module: MQCNNLightningModule, **kwargs, ) -> Iterable: - """Creates data loader for the validation dataset + """ + Creates data loader for the validation dataset. Args: data (Dataset): validation dataset @@ -769,7 +773,8 @@ def create_predictor( transformation: Transformation, module: MQCNNLightningModule, ) -> PyTorchPredictor: - """Creates predictor for inference + """ + Creates predictor for inference. Args: transformation (Transformation): transformation to be applied to data input to predictor diff --git a/src/gluonts/torch/model/mq_cnn/layers.py b/src/gluonts/torch/model/mq_cnn/layers.py index d4351baa79..7c381cd95c 100644 --- a/src/gluonts/torch/model/mq_cnn/layers.py +++ b/src/gluonts/torch/model/mq_cnn/layers.py @@ -253,8 +253,9 @@ def forward( class Enc2Dec(nn.Module): """ - Integrates the encoder_output_static, encoder_output_dynamic and future_features_dynamic - and passes them through as the dynamic input to the decoder. + Integrates the encoder_output_static, encoder_output_dynamic and + future_features_dynamic and passes them through as the dynamic input to the + decoder. Parameters: ------------ @@ -439,7 +440,8 @@ def _get_local_mlp(self, init_dim, final_dim, hidden_dimension_seq): return local_mlp def forward(self, encoded_input: Tensor, future_input: Tensor) -> Tensor: - """Forward pass for MQCNN decoder + """ + Forward pass for MQCNN decoder. Args: encoded_input (Tensor): diff --git a/src/gluonts/transform/split.py b/src/gluonts/transform/split.py index 99b15b1f2e..b0ed1f302c 100644 --- a/src/gluonts/transform/split.py +++ b/src/gluonts/transform/split.py @@ -578,7 +578,9 @@ def flatmap_transform( class ForkingSequenceSplitter(FlatMapTransformation): - """Forking sequence splitter used by MQ-CNN Model""" + """ + Forking sequence splitter used by MQ-CNN Model. + """ @validated() def __init__( @@ -597,7 +599,8 @@ def __init__( start_input_field: str = FieldName.TARGET, lead_time: int = 0, ) -> None: - """Creates forking sequences + """ + Creates forking sequences. Args: instance_sampler ([type]):